python-package-folder 4.3.1__tar.gz → 4.3.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {python_package_folder-4.3.1 → python_package_folder-4.3.2}/PKG-INFO +1 -1
- {python_package_folder-4.3.1 → python_package_folder-4.3.2}/pyproject.toml +1 -1
- {python_package_folder-4.3.1 → python_package_folder-4.3.2}/python_package_folder/scripts/get-next-version.cjs +77 -39
- {python_package_folder-4.3.1 → python_package_folder-4.3.2}/.copier-answers.yml +0 -0
- {python_package_folder-4.3.1 → python_package_folder-4.3.2}/.cursor/plans/optional_version_+_semantic-release_efed88a6.plan.md +0 -0
- {python_package_folder-4.3.1 → python_package_folder-4.3.2}/.cursor/rules/general.mdc +0 -0
- {python_package_folder-4.3.1 → python_package_folder-4.3.2}/.cursor/rules/python.mdc +0 -0
- {python_package_folder-4.3.1 → python_package_folder-4.3.2}/.github/workflows/ci.yml +0 -0
- {python_package_folder-4.3.1 → python_package_folder-4.3.2}/.github/workflows/publish.yml +0 -0
- {python_package_folder-4.3.1 → python_package_folder-4.3.2}/.gitignore +0 -0
- {python_package_folder-4.3.1 → python_package_folder-4.3.2}/.vscode/settings.json +0 -0
- {python_package_folder-4.3.1 → python_package_folder-4.3.2}/LICENSE +0 -0
- {python_package_folder-4.3.1 → python_package_folder-4.3.2}/MANIFEST.in +0 -0
- {python_package_folder-4.3.1 → python_package_folder-4.3.2}/Makefile +0 -0
- {python_package_folder-4.3.1 → python_package_folder-4.3.2}/README.md +0 -0
- {python_package_folder-4.3.1 → python_package_folder-4.3.2}/coverage.svg +0 -0
- {python_package_folder-4.3.1 → python_package_folder-4.3.2}/development.md +0 -0
- {python_package_folder-4.3.1 → python_package_folder-4.3.2}/installation.md +0 -0
- {python_package_folder-4.3.1 → python_package_folder-4.3.2}/publishing.md +0 -0
- {python_package_folder-4.3.1 → python_package_folder-4.3.2}/scripts/get-next-version.cjs +0 -0
- {python_package_folder-4.3.1 → python_package_folder-4.3.2}/src/python_package_folder/__init__.py +0 -0
- {python_package_folder-4.3.1 → python_package_folder-4.3.2}/src/python_package_folder/__main__.py +0 -0
- {python_package_folder-4.3.1 → python_package_folder-4.3.2}/src/python_package_folder/_hatch_build.py +0 -0
- {python_package_folder-4.3.1 → python_package_folder-4.3.2}/src/python_package_folder/analyzer.py +0 -0
- {python_package_folder-4.3.1 → python_package_folder-4.3.2}/src/python_package_folder/finder.py +0 -0
- {python_package_folder-4.3.1 → python_package_folder-4.3.2}/src/python_package_folder/manager.py +0 -0
- {python_package_folder-4.3.1 → python_package_folder-4.3.2}/src/python_package_folder/publisher.py +0 -0
- {python_package_folder-4.3.1 → python_package_folder-4.3.2}/src/python_package_folder/py.typed +0 -0
- {python_package_folder-4.3.1 → python_package_folder-4.3.2}/src/python_package_folder/python_package_folder.py +0 -0
- {python_package_folder-4.3.1 → python_package_folder-4.3.2}/src/python_package_folder/subfolder_build.py +0 -0
- {python_package_folder-4.3.1 → python_package_folder-4.3.2}/src/python_package_folder/types.py +0 -0
- {python_package_folder-4.3.1 → python_package_folder-4.3.2}/src/python_package_folder/utils.py +0 -0
- {python_package_folder-4.3.1 → python_package_folder-4.3.2}/src/python_package_folder/version.py +0 -0
- {python_package_folder-4.3.1 → python_package_folder-4.3.2}/tests/conftest.py +0 -0
- {python_package_folder-4.3.1 → python_package_folder-4.3.2}/tests/folder_structure/some_globals.py +0 -0
- {python_package_folder-4.3.1 → python_package_folder-4.3.2}/tests/folder_structure/subfolder_to_build/README.md +0 -0
- {python_package_folder-4.3.1 → python_package_folder-4.3.2}/tests/folder_structure/subfolder_to_build/__init__.py +0 -0
- {python_package_folder-4.3.1 → python_package_folder-4.3.2}/tests/folder_structure/subfolder_to_build/some_function.py +0 -0
- {python_package_folder-4.3.1 → python_package_folder-4.3.2}/tests/folder_structure/subfolder_to_build/some_globals.py +0 -0
- {python_package_folder-4.3.1 → python_package_folder-4.3.2}/tests/folder_structure/utility_folder/_SS/some_superseded_file.py +0 -0
- {python_package_folder-4.3.1 → python_package_folder-4.3.2}/tests/folder_structure/utility_folder/some_utility.py +0 -0
- {python_package_folder-4.3.1 → python_package_folder-4.3.2}/tests/test_build_with_external_deps.py +0 -0
- {python_package_folder-4.3.1 → python_package_folder-4.3.2}/tests/test_linting.py +0 -0
- {python_package_folder-4.3.1 → python_package_folder-4.3.2}/tests/test_preserve_directory_structure.py +0 -0
- {python_package_folder-4.3.1 → python_package_folder-4.3.2}/tests/test_publisher.py +0 -0
- {python_package_folder-4.3.1 → python_package_folder-4.3.2}/tests/test_shared_subdirectory_imports.py +0 -0
- {python_package_folder-4.3.1 → python_package_folder-4.3.2}/tests/test_spreadsheet_creation_imports.py +0 -0
- {python_package_folder-4.3.1 → python_package_folder-4.3.2}/tests/test_subfolder_build.py +0 -0
- {python_package_folder-4.3.1 → python_package_folder-4.3.2}/tests/test_third_party_dependencies.py +0 -0
- {python_package_folder-4.3.1 → python_package_folder-4.3.2}/tests/test_utils.py +0 -0
- {python_package_folder-4.3.1 → python_package_folder-4.3.2}/tests/test_version_manager.py +0 -0
- {python_package_folder-4.3.1 → python_package_folder-4.3.2}/tests/tests.py +0 -0
- {python_package_folder-4.3.1 → python_package_folder-4.3.2}/uv.lock +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-package-folder
|
|
3
|
-
Version: 4.3.
|
|
3
|
+
Version: 4.3.2
|
|
4
4
|
Summary: Python package to automatically package and build a folder, fetching all relevant dependencies.
|
|
5
5
|
Project-URL: Repository, https://github.com/alelom/python-package-folder
|
|
6
6
|
Author-email: Alessio Lombardi <work@alelom.com>
|
|
@@ -314,50 +314,76 @@ async function queryRegistryVersion(packageName, repository, repositoryUrl) {
|
|
|
314
314
|
/**
|
|
315
315
|
* Get global npm prefix for module resolution.
|
|
316
316
|
* This helps find globally installed npm packages.
|
|
317
|
-
* @returns {string
|
|
317
|
+
* @returns {string[]} Array of possible global node_modules paths
|
|
318
318
|
*/
|
|
319
|
-
function
|
|
319
|
+
function getGlobalNpmPaths() {
|
|
320
|
+
const paths = [];
|
|
321
|
+
|
|
320
322
|
try {
|
|
321
323
|
// Get npm's global prefix (where global packages are installed)
|
|
322
324
|
const prefix = execSync('npm config get prefix', { encoding: 'utf8' }).trim();
|
|
323
|
-
|
|
325
|
+
|
|
326
|
+
// Global node_modules is typically at <prefix>/lib/node_modules (Linux/Mac)
|
|
324
327
|
const globalNodeModules = path.join(prefix, 'lib', 'node_modules');
|
|
325
328
|
if (fs.existsSync(globalNodeModules)) {
|
|
326
|
-
|
|
329
|
+
paths.push(globalNodeModules);
|
|
327
330
|
}
|
|
331
|
+
|
|
328
332
|
// Alternative location on some systems
|
|
329
333
|
const altGlobalNodeModules = path.join(prefix, 'node_modules');
|
|
330
334
|
if (fs.existsSync(altGlobalNodeModules)) {
|
|
331
|
-
|
|
335
|
+
paths.push(altGlobalNodeModules);
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
// Also try the prefix itself (some npm configurations)
|
|
339
|
+
if (fs.existsSync(prefix)) {
|
|
340
|
+
paths.push(prefix);
|
|
332
341
|
}
|
|
333
|
-
return null;
|
|
334
342
|
} catch (e) {
|
|
335
|
-
// If npm config fails,
|
|
336
|
-
return null;
|
|
343
|
+
// If npm config fails, continue with other methods
|
|
337
344
|
}
|
|
345
|
+
|
|
346
|
+
// Try npm root -g to get global node_modules directly
|
|
347
|
+
try {
|
|
348
|
+
const npmRoot = execSync('npm root -g', { encoding: 'utf8' }).trim();
|
|
349
|
+
if (fs.existsSync(npmRoot) && !paths.includes(npmRoot)) {
|
|
350
|
+
paths.push(npmRoot);
|
|
351
|
+
}
|
|
352
|
+
} catch (e) {
|
|
353
|
+
// Ignore errors
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
// Check NODE_PATH environment variable
|
|
357
|
+
if (process.env.NODE_PATH) {
|
|
358
|
+
const nodePaths = process.env.NODE_PATH.split(path.delimiter);
|
|
359
|
+
for (const nodePath of nodePaths) {
|
|
360
|
+
if (fs.existsSync(nodePath) && !paths.includes(nodePath)) {
|
|
361
|
+
paths.push(nodePath);
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
return paths;
|
|
338
367
|
}
|
|
339
368
|
|
|
340
369
|
// Main execution
|
|
341
370
|
(async () => {
|
|
342
371
|
try {
|
|
343
|
-
// Get global npm
|
|
344
|
-
const
|
|
345
|
-
const resolvePaths = [projectRoot];
|
|
346
|
-
if (globalNpmPath) {
|
|
347
|
-
resolvePaths.push(globalNpmPath);
|
|
348
|
-
}
|
|
372
|
+
// Get global npm paths for module resolution
|
|
373
|
+
const globalNpmPaths = getGlobalNpmPaths();
|
|
374
|
+
const resolvePaths = [projectRoot, ...globalNpmPaths];
|
|
349
375
|
|
|
350
376
|
// Try to require semantic-release
|
|
351
|
-
// First try resolving from project root
|
|
377
|
+
// First try resolving from project root + global paths, then try global only, then fall back to default
|
|
352
378
|
let semanticRelease;
|
|
353
379
|
try {
|
|
354
380
|
const semanticReleasePath = require.resolve('semantic-release', { paths: resolvePaths });
|
|
355
381
|
semanticRelease = require(semanticReleasePath);
|
|
356
382
|
} catch (resolveError) {
|
|
357
383
|
try {
|
|
358
|
-
// Try with just global
|
|
359
|
-
if (
|
|
360
|
-
const semanticReleasePath = require.resolve('semantic-release', { paths:
|
|
384
|
+
// Try with just global paths
|
|
385
|
+
if (globalNpmPaths.length > 0) {
|
|
386
|
+
const semanticReleasePath = require.resolve('semantic-release', { paths: globalNpmPaths });
|
|
361
387
|
semanticRelease = require(semanticReleasePath);
|
|
362
388
|
} else {
|
|
363
389
|
throw resolveError;
|
|
@@ -382,29 +408,41 @@ function getGlobalNpmPrefix() {
|
|
|
382
408
|
// For subfolder builds, require semantic-release-commit-filter
|
|
383
409
|
// (required only to verify it's installed; the plugin is used via options.plugins)
|
|
384
410
|
if (isSubfolderBuild) {
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
411
|
+
let commitFilterFound = false;
|
|
412
|
+
let lastError = null;
|
|
413
|
+
|
|
414
|
+
// Try resolving from all paths
|
|
415
|
+
for (const tryPath of resolvePaths) {
|
|
389
416
|
try {
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
}
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
417
|
+
const commitFilterPath = require.resolve('semantic-release-commit-filter', { paths: [tryPath] });
|
|
418
|
+
require(commitFilterPath);
|
|
419
|
+
commitFilterFound = true;
|
|
420
|
+
break;
|
|
421
|
+
} catch (e) {
|
|
422
|
+
lastError = e;
|
|
423
|
+
continue;
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
// If not found in any path, try default require
|
|
428
|
+
if (!commitFilterFound) {
|
|
429
|
+
try {
|
|
430
|
+
require('semantic-release-commit-filter');
|
|
431
|
+
commitFilterFound = true;
|
|
432
|
+
} catch (e) {
|
|
433
|
+
lastError = e;
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
if (!commitFilterFound) {
|
|
438
|
+
console.error('Error: semantic-release-commit-filter is not installed.');
|
|
439
|
+
console.error('Please install it with: npm install -g semantic-release-commit-filter');
|
|
440
|
+
console.error('Or install it as a devDependency: npm install --save-dev semantic-release-commit-filter');
|
|
441
|
+
console.error(`Debug: Tried resolving from paths: ${resolvePaths.join(', ')}`);
|
|
442
|
+
if (lastError) {
|
|
443
|
+
console.error(`Debug: Last error: ${lastError.message}`);
|
|
407
444
|
}
|
|
445
|
+
process.exit(1);
|
|
408
446
|
}
|
|
409
447
|
}
|
|
410
448
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_package_folder-4.3.1 → python_package_folder-4.3.2}/src/python_package_folder/__init__.py
RENAMED
|
File without changes
|
{python_package_folder-4.3.1 → python_package_folder-4.3.2}/src/python_package_folder/__main__.py
RENAMED
|
File without changes
|
|
File without changes
|
{python_package_folder-4.3.1 → python_package_folder-4.3.2}/src/python_package_folder/analyzer.py
RENAMED
|
File without changes
|
{python_package_folder-4.3.1 → python_package_folder-4.3.2}/src/python_package_folder/finder.py
RENAMED
|
File without changes
|
{python_package_folder-4.3.1 → python_package_folder-4.3.2}/src/python_package_folder/manager.py
RENAMED
|
File without changes
|
{python_package_folder-4.3.1 → python_package_folder-4.3.2}/src/python_package_folder/publisher.py
RENAMED
|
File without changes
|
{python_package_folder-4.3.1 → python_package_folder-4.3.2}/src/python_package_folder/py.typed
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_package_folder-4.3.1 → python_package_folder-4.3.2}/src/python_package_folder/types.py
RENAMED
|
File without changes
|
{python_package_folder-4.3.1 → python_package_folder-4.3.2}/src/python_package_folder/utils.py
RENAMED
|
File without changes
|
{python_package_folder-4.3.1 → python_package_folder-4.3.2}/src/python_package_folder/version.py
RENAMED
|
File without changes
|
|
File without changes
|
{python_package_folder-4.3.1 → python_package_folder-4.3.2}/tests/folder_structure/some_globals.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_package_folder-4.3.1 → python_package_folder-4.3.2}/tests/test_build_with_external_deps.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_package_folder-4.3.1 → python_package_folder-4.3.2}/tests/test_third_party_dependencies.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|