python-package-folder 1.1.0__tar.gz → 1.1.1__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-1.1.0 → python_package_folder-1.1.1}/PKG-INFO +1 -1
- {python_package_folder-1.1.0 → python_package_folder-1.1.1}/src/python_package_folder/finder.py +8 -9
- {python_package_folder-1.1.0 → python_package_folder-1.1.1}/src/python_package_folder/manager.py +12 -2
- {python_package_folder-1.1.0 → python_package_folder-1.1.1}/.copier-answers.yml +0 -0
- {python_package_folder-1.1.0 → python_package_folder-1.1.1}/.cursor/rules/general.mdc +0 -0
- {python_package_folder-1.1.0 → python_package_folder-1.1.1}/.cursor/rules/python.mdc +0 -0
- {python_package_folder-1.1.0 → python_package_folder-1.1.1}/.github/workflows/ci.yml +0 -0
- {python_package_folder-1.1.0 → python_package_folder-1.1.1}/.github/workflows/publish.yml +0 -0
- {python_package_folder-1.1.0 → python_package_folder-1.1.1}/.gitignore +0 -0
- {python_package_folder-1.1.0 → python_package_folder-1.1.1}/.vscode/settings.json +0 -0
- {python_package_folder-1.1.0 → python_package_folder-1.1.1}/LICENSE +0 -0
- {python_package_folder-1.1.0 → python_package_folder-1.1.1}/Makefile +0 -0
- {python_package_folder-1.1.0 → python_package_folder-1.1.1}/README.md +0 -0
- {python_package_folder-1.1.0 → python_package_folder-1.1.1}/coverage.svg +0 -0
- {python_package_folder-1.1.0 → python_package_folder-1.1.1}/development.md +0 -0
- {python_package_folder-1.1.0 → python_package_folder-1.1.1}/installation.md +0 -0
- {python_package_folder-1.1.0 → python_package_folder-1.1.1}/publishing.md +0 -0
- {python_package_folder-1.1.0 → python_package_folder-1.1.1}/pyproject.toml +0 -0
- {python_package_folder-1.1.0 → python_package_folder-1.1.1}/src/python_package_folder/__init__.py +0 -0
- {python_package_folder-1.1.0 → python_package_folder-1.1.1}/src/python_package_folder/__main__.py +0 -0
- {python_package_folder-1.1.0 → python_package_folder-1.1.1}/src/python_package_folder/analyzer.py +0 -0
- {python_package_folder-1.1.0 → python_package_folder-1.1.1}/src/python_package_folder/publisher.py +0 -0
- {python_package_folder-1.1.0 → python_package_folder-1.1.1}/src/python_package_folder/py.typed +0 -0
- {python_package_folder-1.1.0 → python_package_folder-1.1.1}/src/python_package_folder/python_package_folder.py +0 -0
- {python_package_folder-1.1.0 → python_package_folder-1.1.1}/src/python_package_folder/subfolder_build.py +0 -0
- {python_package_folder-1.1.0 → python_package_folder-1.1.1}/src/python_package_folder/types.py +0 -0
- {python_package_folder-1.1.0 → python_package_folder-1.1.1}/src/python_package_folder/utils.py +0 -0
- {python_package_folder-1.1.0 → python_package_folder-1.1.1}/src/python_package_folder/version.py +0 -0
- {python_package_folder-1.1.0 → python_package_folder-1.1.1}/tests/folder_structure/some_globals.py +0 -0
- {python_package_folder-1.1.0 → python_package_folder-1.1.1}/tests/folder_structure/subfolder_to_build/README.md +0 -0
- {python_package_folder-1.1.0 → python_package_folder-1.1.1}/tests/folder_structure/subfolder_to_build/some_function.py +0 -0
- {python_package_folder-1.1.0 → python_package_folder-1.1.1}/tests/folder_structure/utility_folder/some_utility.py +0 -0
- {python_package_folder-1.1.0 → python_package_folder-1.1.1}/tests/test_build_with_external_deps.py +0 -0
- {python_package_folder-1.1.0 → python_package_folder-1.1.1}/tests/test_publisher.py +0 -0
- {python_package_folder-1.1.0 → python_package_folder-1.1.1}/tests/test_subfolder_build.py +0 -0
- {python_package_folder-1.1.0 → python_package_folder-1.1.1}/tests/test_utils.py +0 -0
- {python_package_folder-1.1.0 → python_package_folder-1.1.1}/tests/test_version_manager.py +0 -0
- {python_package_folder-1.1.0 → python_package_folder-1.1.1}/tests/tests.py +0 -0
- {python_package_folder-1.1.0 → python_package_folder-1.1.1}/uv.lock +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-package-folder
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.1
|
|
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-1.1.0 → python_package_folder-1.1.1}/src/python_package_folder/finder.py
RENAMED
|
@@ -74,23 +74,22 @@ class ExternalDependencyFinder:
|
|
|
74
74
|
if self._should_exclude_path(source_path):
|
|
75
75
|
continue
|
|
76
76
|
|
|
77
|
-
# For files,
|
|
78
|
-
#
|
|
79
|
-
# 1. It's a package (has __init__.py), OR
|
|
80
|
-
# 2. Files from it are actually imported (which is the case here since source_path is a file)
|
|
77
|
+
# For files, only copy parent directory if it's a package
|
|
78
|
+
# Otherwise, copy just the individual file
|
|
81
79
|
if source_path.is_file():
|
|
82
80
|
parent_dir = source_path.parent
|
|
83
81
|
module_parts = imp.module_name.split(".")
|
|
84
82
|
|
|
85
|
-
#
|
|
83
|
+
# Only copy parent directory if it's a package (has __init__.py)
|
|
84
|
+
# This ensures we maintain package structure when needed,
|
|
85
|
+
# but don't copy entire directory trees unnecessarily
|
|
86
86
|
parent_is_package = (parent_dir / "__init__.py").exists()
|
|
87
|
-
|
|
88
|
-
|
|
87
|
+
files_are_imported = True # Always true when processing an import
|
|
88
|
+
is_multi_level = len(module_parts) > 2
|
|
89
89
|
|
|
90
90
|
should_copy_dir = (
|
|
91
91
|
not self._should_exclude_path(parent_dir)
|
|
92
|
-
and (parent_is_package or
|
|
93
|
-
and len(module_parts) > 2 # Has at least package.module structure
|
|
92
|
+
and (parent_is_package or (files_are_imported and is_multi_level)) # Package OR (files imported AND multi-level)
|
|
94
93
|
and not parent_dir.is_relative_to(self.src_dir)
|
|
95
94
|
and not self.src_dir.is_relative_to(parent_dir)
|
|
96
95
|
and parent_dir != self.project_root
|
{python_package_folder-1.1.0 → python_package_folder-1.1.1}/src/python_package_folder/manager.py
RENAMED
|
@@ -252,9 +252,19 @@ class BuildManager:
|
|
|
252
252
|
|
|
253
253
|
def should_exclude(path: Path) -> bool:
|
|
254
254
|
"""Check if a path should be excluded."""
|
|
255
|
-
|
|
256
|
-
|
|
255
|
+
# Check the path name itself and all its parts
|
|
256
|
+
path_str = str(path)
|
|
257
|
+
path_name = path.name
|
|
258
|
+
for pattern in exclude_patterns:
|
|
259
|
+
# Check if path name starts with or equals the pattern
|
|
260
|
+
if path_name.startswith(pattern) or path_name == pattern:
|
|
257
261
|
return True
|
|
262
|
+
# Also check if any part of the path contains the pattern
|
|
263
|
+
if pattern in path_str:
|
|
264
|
+
# Check each part individually
|
|
265
|
+
for part in path.parts:
|
|
266
|
+
if part.startswith(pattern) or part == pattern:
|
|
267
|
+
return True
|
|
258
268
|
return False
|
|
259
269
|
|
|
260
270
|
# Create destination directory
|
|
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-1.1.0 → python_package_folder-1.1.1}/src/python_package_folder/__init__.py
RENAMED
|
File without changes
|
{python_package_folder-1.1.0 → python_package_folder-1.1.1}/src/python_package_folder/__main__.py
RENAMED
|
File without changes
|
{python_package_folder-1.1.0 → python_package_folder-1.1.1}/src/python_package_folder/analyzer.py
RENAMED
|
File without changes
|
{python_package_folder-1.1.0 → python_package_folder-1.1.1}/src/python_package_folder/publisher.py
RENAMED
|
File without changes
|
{python_package_folder-1.1.0 → python_package_folder-1.1.1}/src/python_package_folder/py.typed
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_package_folder-1.1.0 → python_package_folder-1.1.1}/src/python_package_folder/types.py
RENAMED
|
File without changes
|
{python_package_folder-1.1.0 → python_package_folder-1.1.1}/src/python_package_folder/utils.py
RENAMED
|
File without changes
|
{python_package_folder-1.1.0 → python_package_folder-1.1.1}/src/python_package_folder/version.py
RENAMED
|
File without changes
|
{python_package_folder-1.1.0 → python_package_folder-1.1.1}/tests/folder_structure/some_globals.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_package_folder-1.1.0 → python_package_folder-1.1.1}/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
|