python-package-folder 5.2.2__tar.gz → 5.2.3__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-5.2.2 → python_package_folder-5.2.3}/PKG-INFO +1 -1
- {python_package_folder-5.2.2 → python_package_folder-5.2.3}/pyproject.toml +1 -1
- {python_package_folder-5.2.2 → python_package_folder-5.2.3}/src/python_package_folder/manager.py +8 -0
- {python_package_folder-5.2.2 → python_package_folder-5.2.3}/src/python_package_folder/publisher.py +18 -6
- {python_package_folder-5.2.2 → python_package_folder-5.2.3}/src/python_package_folder/python_package_folder.py +8 -0
- {python_package_folder-5.2.2 → python_package_folder-5.2.3}/src/python_package_folder/subfolder_build.py +9 -0
- {python_package_folder-5.2.2 → python_package_folder-5.2.3}/src/python_package_folder/version_calculator.py +21 -4
- {python_package_folder-5.2.2 → python_package_folder-5.2.3}/.copier-answers.yml +0 -0
- {python_package_folder-5.2.2 → python_package_folder-5.2.3}/.cursor/plans/optional_version_+_semantic-release_efed88a6.plan.md +0 -0
- {python_package_folder-5.2.2 → python_package_folder-5.2.3}/.cursor/plans/replace_node.js_semantic-release_with_custom_python_implementation_64e05e1a.plan.md +0 -0
- {python_package_folder-5.2.2 → python_package_folder-5.2.3}/.cursor/rules/general.mdc +0 -0
- {python_package_folder-5.2.2 → python_package_folder-5.2.3}/.cursor/rules/python.mdc +0 -0
- {python_package_folder-5.2.2 → python_package_folder-5.2.3}/.github/workflows/ci.yml +0 -0
- {python_package_folder-5.2.2 → python_package_folder-5.2.3}/.github/workflows/publish.yml +0 -0
- {python_package_folder-5.2.2 → python_package_folder-5.2.3}/.gitignore +0 -0
- {python_package_folder-5.2.2 → python_package_folder-5.2.3}/.vscode/settings.json +0 -0
- {python_package_folder-5.2.2 → python_package_folder-5.2.3}/LICENSE +0 -0
- {python_package_folder-5.2.2 → python_package_folder-5.2.3}/MANIFEST.in +0 -0
- {python_package_folder-5.2.2 → python_package_folder-5.2.3}/Makefile +0 -0
- {python_package_folder-5.2.2 → python_package_folder-5.2.3}/README.md +0 -0
- {python_package_folder-5.2.2 → python_package_folder-5.2.3}/coverage.svg +0 -0
- {python_package_folder-5.2.2 → python_package_folder-5.2.3}/development.md +0 -0
- {python_package_folder-5.2.2 → python_package_folder-5.2.3}/docs/DEVELOPMENT.md +0 -0
- {python_package_folder-5.2.2 → python_package_folder-5.2.3}/docs/INSTALLATION.md +0 -0
- {python_package_folder-5.2.2 → python_package_folder-5.2.3}/docs/PUBLISHING.md +0 -0
- {python_package_folder-5.2.2 → python_package_folder-5.2.3}/docs/REFERENCE.md +0 -0
- {python_package_folder-5.2.2 → python_package_folder-5.2.3}/docs/USAGE.md +0 -0
- {python_package_folder-5.2.2 → python_package_folder-5.2.3}/docs/VERSION_RESOLUTION.md +0 -0
- {python_package_folder-5.2.2 → python_package_folder-5.2.3}/installation.md +0 -0
- {python_package_folder-5.2.2 → python_package_folder-5.2.3}/publishing.md +0 -0
- {python_package_folder-5.2.2 → python_package_folder-5.2.3}/src/python_package_folder/__init__.py +0 -0
- {python_package_folder-5.2.2 → python_package_folder-5.2.3}/src/python_package_folder/__main__.py +0 -0
- {python_package_folder-5.2.2 → python_package_folder-5.2.3}/src/python_package_folder/analyzer.py +0 -0
- {python_package_folder-5.2.2 → python_package_folder-5.2.3}/src/python_package_folder/finder.py +0 -0
- {python_package_folder-5.2.2 → python_package_folder-5.2.3}/src/python_package_folder/py.typed +0 -0
- {python_package_folder-5.2.2 → python_package_folder-5.2.3}/src/python_package_folder/types.py +0 -0
- {python_package_folder-5.2.2 → python_package_folder-5.2.3}/src/python_package_folder/utils.py +0 -0
- {python_package_folder-5.2.2 → python_package_folder-5.2.3}/src/python_package_folder/version.py +0 -0
- {python_package_folder-5.2.2 → python_package_folder-5.2.3}/tests/conftest.py +0 -0
- {python_package_folder-5.2.2 → python_package_folder-5.2.3}/tests/folder_structure/some_globals.py +0 -0
- {python_package_folder-5.2.2 → python_package_folder-5.2.3}/tests/folder_structure/subfolder_to_build/README.md +0 -0
- {python_package_folder-5.2.2 → python_package_folder-5.2.3}/tests/folder_structure/subfolder_to_build/__init__.py +0 -0
- {python_package_folder-5.2.2 → python_package_folder-5.2.3}/tests/folder_structure/subfolder_to_build/some_function.py +0 -0
- {python_package_folder-5.2.2 → python_package_folder-5.2.3}/tests/folder_structure/subfolder_to_build/some_globals.py +0 -0
- {python_package_folder-5.2.2 → python_package_folder-5.2.3}/tests/folder_structure/utility_folder/_SS/some_superseded_file.py +0 -0
- {python_package_folder-5.2.2 → python_package_folder-5.2.3}/tests/folder_structure/utility_folder/some_utility.py +0 -0
- {python_package_folder-5.2.2 → python_package_folder-5.2.3}/tests/test_build_with_external_deps.py +0 -0
- {python_package_folder-5.2.2 → python_package_folder-5.2.3}/tests/test_exclude_patterns.py +0 -0
- {python_package_folder-5.2.2 → python_package_folder-5.2.3}/tests/test_linting.py +0 -0
- {python_package_folder-5.2.2 → python_package_folder-5.2.3}/tests/test_preserve_directory_structure.py +0 -0
- {python_package_folder-5.2.2 → python_package_folder-5.2.3}/tests/test_publisher.py +0 -0
- {python_package_folder-5.2.2 → python_package_folder-5.2.3}/tests/test_shared_subdirectory_imports.py +0 -0
- {python_package_folder-5.2.2 → python_package_folder-5.2.3}/tests/test_spreadsheet_creation_imports.py +0 -0
- {python_package_folder-5.2.2 → python_package_folder-5.2.3}/tests/test_subfolder_build.py +0 -0
- {python_package_folder-5.2.2 → python_package_folder-5.2.3}/tests/test_third_party_dependencies.py +0 -0
- {python_package_folder-5.2.2 → python_package_folder-5.2.3}/tests/test_utils.py +0 -0
- {python_package_folder-5.2.2 → python_package_folder-5.2.3}/tests/test_version_calculator.py +0 -0
- {python_package_folder-5.2.2 → python_package_folder-5.2.3}/tests/test_version_manager.py +0 -0
- {python_package_folder-5.2.2 → python_package_folder-5.2.3}/tests/tests.py +0 -0
- {python_package_folder-5.2.2 → python_package_folder-5.2.3}/uv.lock +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-package-folder
|
|
3
|
-
Version: 5.2.
|
|
3
|
+
Version: 5.2.3
|
|
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>
|
{python_package_folder-5.2.2 → python_package_folder-5.2.3}/src/python_package_folder/manager.py
RENAMED
|
@@ -1227,6 +1227,14 @@ class BuildManager:
|
|
|
1227
1227
|
publish_package_name = (
|
|
1228
1228
|
self.src_dir.name.replace("_", "-").replace(" ", "-").lower().strip("-")
|
|
1229
1229
|
)
|
|
1230
|
+
|
|
1231
|
+
# Log the package name being used for publishing
|
|
1232
|
+
import logging
|
|
1233
|
+
logger = logging.getLogger(__name__)
|
|
1234
|
+
logger.info(
|
|
1235
|
+
f"Publishing package with name: '{publish_package_name}' "
|
|
1236
|
+
f"(captured: {captured_package_name}, param: {package_name}, src_dir: '{self.src_dir.name}')"
|
|
1237
|
+
)
|
|
1230
1238
|
else:
|
|
1231
1239
|
# For regular builds, get package name from pyproject.toml
|
|
1232
1240
|
try:
|
{python_package_folder-5.2.2 → python_package_folder-5.2.3}/src/python_package_folder/publisher.py
RENAMED
|
@@ -346,12 +346,24 @@ class Publisher:
|
|
|
346
346
|
# Provide helpful hints based on common errors
|
|
347
347
|
if e.returncode == 1:
|
|
348
348
|
if e.stderr and ("already exists" in e.stderr.lower() or "409" in e.stderr or "conflict" in e.stderr.lower()):
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
349
|
+
if self.repository == Repository.AZURE:
|
|
350
|
+
print(
|
|
351
|
+
"\nHint for Azure Artifacts: If the version query returned 404 (not found) "
|
|
352
|
+
"with authentication but the upload returns 409 Conflict, this could indicate:\n"
|
|
353
|
+
" - Different authentication requirements between simple index (read) and upload (write) endpoints\n"
|
|
354
|
+
" - The simple index endpoint may require different permissions or authentication method\n"
|
|
355
|
+
" - The package already exists with this version\n"
|
|
356
|
+
" - Use --skip-existing to skip files that already exist\n"
|
|
357
|
+
" - Check if your token has 'Packaging (read)' scope in addition to 'Packaging (read & write)'",
|
|
358
|
+
file=sys.stderr,
|
|
359
|
+
)
|
|
360
|
+
else:
|
|
361
|
+
print(
|
|
362
|
+
"\nHint: This version may already exist on the repository. "
|
|
363
|
+
"Use --skip-existing to skip files that already exist, "
|
|
364
|
+
"or publish a new version.",
|
|
365
|
+
file=sys.stderr,
|
|
366
|
+
)
|
|
355
367
|
elif e.stderr and ("401" in e.stderr or "unauthorized" in e.stderr.lower()):
|
|
356
368
|
print(
|
|
357
369
|
"\nHint: Authentication failed. Check your credentials.",
|
|
@@ -208,6 +208,14 @@ def main() -> int:
|
|
|
208
208
|
" ", "-"
|
|
209
209
|
).lower().strip("-")
|
|
210
210
|
subfolder_rel_path = src_dir.relative_to(project_root)
|
|
211
|
+
|
|
212
|
+
# Log the package name being used for version query
|
|
213
|
+
logger = logging.getLogger(__name__)
|
|
214
|
+
logger.info(
|
|
215
|
+
f"Querying registry for package name: '{package_name}' "
|
|
216
|
+
f"(derived from src_dir: '{src_dir.name}', args.package_name: {args.package_name})"
|
|
217
|
+
)
|
|
218
|
+
|
|
211
219
|
resolved_version, error_details = resolve_version(
|
|
212
220
|
project_root,
|
|
213
221
|
package_name=package_name,
|
|
@@ -402,6 +402,10 @@ class SubfolderBuildConfig:
|
|
|
402
402
|
# Modify using parsed data
|
|
403
403
|
if "project" in data:
|
|
404
404
|
data["project"]["name"] = self.package_name
|
|
405
|
+
# Log the package name being set
|
|
406
|
+
import logging
|
|
407
|
+
logger = logging.getLogger(__name__)
|
|
408
|
+
logger.info(f"Setting package name in temporary pyproject.toml: '{self.package_name}'")
|
|
405
409
|
if "version" in data["project"]:
|
|
406
410
|
data["project"]["version"] = self.version
|
|
407
411
|
elif "dynamic" in data["project"]:
|
|
@@ -475,6 +479,11 @@ class SubfolderBuildConfig:
|
|
|
475
479
|
if not package_dirs:
|
|
476
480
|
package_dirs = []
|
|
477
481
|
|
|
482
|
+
# Log the package name being set via string manipulation
|
|
483
|
+
import logging
|
|
484
|
+
logger = logging.getLogger(__name__)
|
|
485
|
+
logger.info(f"Setting package name in temporary pyproject.toml (string manipulation): '{self.package_name}'")
|
|
486
|
+
|
|
478
487
|
for _i, line in enumerate(lines):
|
|
479
488
|
# Skip build-system section - we'll add our own for subfolder builds
|
|
480
489
|
if line.strip().startswith("[build-system]"):
|
|
@@ -246,10 +246,27 @@ def _query_azure_artifacts_version(
|
|
|
246
246
|
)
|
|
247
247
|
return None
|
|
248
248
|
elif response.status_code == 404:
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
249
|
+
if auth:
|
|
250
|
+
# If we're using authentication and still get 404, it could be various issues
|
|
251
|
+
logger.warning(
|
|
252
|
+
f"Package '{package_name}' not found on Azure Artifacts (404) with authentication. "
|
|
253
|
+
f"This could indicate:\n"
|
|
254
|
+
f" (1) Different authentication requirements between simple index (read) and upload (write) endpoints\n"
|
|
255
|
+
f" (2) The simple index endpoint may require different permissions or authentication method\n"
|
|
256
|
+
f" (3) This is the first release (package doesn't exist yet)\n"
|
|
257
|
+
f" (4) Package name mismatch between query and publish\n"
|
|
258
|
+
f"URL: {simple_index_url}\n"
|
|
259
|
+
f"Note: If publishing succeeds but querying fails with 404, check:\n"
|
|
260
|
+
f" - Whether the simple index endpoint requires different authentication\n"
|
|
261
|
+
f" - Whether your token has 'Packaging (read)' scope in addition to 'Packaging (read & write)'\n"
|
|
262
|
+
f" - Whether the package name used for querying matches the published package name"
|
|
263
|
+
)
|
|
264
|
+
else:
|
|
265
|
+
logger.info(
|
|
266
|
+
f"Package '{package_name}' not found on Azure Artifacts (404) - this appears to be the first release. "
|
|
267
|
+
f"Note: If authentication is required, provide credentials via --username/--password or environment variables. "
|
|
268
|
+
f"URL: {simple_index_url}"
|
|
269
|
+
)
|
|
253
270
|
return None
|
|
254
271
|
elif response.status_code != 200:
|
|
255
272
|
logger.warning(
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_package_folder-5.2.2 → python_package_folder-5.2.3}/src/python_package_folder/__init__.py
RENAMED
|
File without changes
|
{python_package_folder-5.2.2 → python_package_folder-5.2.3}/src/python_package_folder/__main__.py
RENAMED
|
File without changes
|
{python_package_folder-5.2.2 → python_package_folder-5.2.3}/src/python_package_folder/analyzer.py
RENAMED
|
File without changes
|
{python_package_folder-5.2.2 → python_package_folder-5.2.3}/src/python_package_folder/finder.py
RENAMED
|
File without changes
|
{python_package_folder-5.2.2 → python_package_folder-5.2.3}/src/python_package_folder/py.typed
RENAMED
|
File without changes
|
{python_package_folder-5.2.2 → python_package_folder-5.2.3}/src/python_package_folder/types.py
RENAMED
|
File without changes
|
{python_package_folder-5.2.2 → python_package_folder-5.2.3}/src/python_package_folder/utils.py
RENAMED
|
File without changes
|
{python_package_folder-5.2.2 → python_package_folder-5.2.3}/src/python_package_folder/version.py
RENAMED
|
File without changes
|
|
File without changes
|
{python_package_folder-5.2.2 → python_package_folder-5.2.3}/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-5.2.2 → python_package_folder-5.2.3}/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
|
|
File without changes
|
{python_package_folder-5.2.2 → python_package_folder-5.2.3}/tests/test_third_party_dependencies.py
RENAMED
|
File without changes
|
|
File without changes
|
{python_package_folder-5.2.2 → python_package_folder-5.2.3}/tests/test_version_calculator.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|