python-package-folder 4.1.1__py3-none-any.whl → 4.1.2__py3-none-any.whl
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/python_package_folder.py +37 -6
- {python_package_folder-4.1.1.dist-info → python_package_folder-4.1.2.dist-info}/METADATA +1 -1
- {python_package_folder-4.1.1.dist-info → python_package_folder-4.1.2.dist-info}/RECORD +6 -6
- {python_package_folder-4.1.1.dist-info → python_package_folder-4.1.2.dist-info}/WHEEL +0 -0
- {python_package_folder-4.1.1.dist-info → python_package_folder-4.1.2.dist-info}/entry_points.txt +0 -0
- {python_package_folder-4.1.1.dist-info → python_package_folder-4.1.2.dist-info}/licenses/LICENSE +0 -0
|
@@ -98,37 +98,68 @@ Alternatively, provide --version explicitly to skip automatic version resolution
|
|
|
98
98
|
else:
|
|
99
99
|
# Try to locate script in installed package using importlib.resources
|
|
100
100
|
script_path = None
|
|
101
|
+
diagnostic_info = []
|
|
102
|
+
|
|
103
|
+
# Try importlib.resources approach
|
|
101
104
|
try:
|
|
102
105
|
package = resources.files("python_package_folder")
|
|
103
106
|
script_resource = package / "scripts" / "get-next-version.cjs"
|
|
107
|
+
|
|
108
|
+
diagnostic_info.append(f"Checked importlib.resources: python_package_folder/scripts/get-next-version.cjs")
|
|
109
|
+
|
|
104
110
|
if script_resource.is_file():
|
|
105
111
|
# Try direct path conversion first (normal file system install)
|
|
106
112
|
try:
|
|
107
113
|
script_path_candidate = Path(str(script_resource))
|
|
108
114
|
if script_path_candidate.exists():
|
|
109
115
|
script_path = script_path_candidate
|
|
110
|
-
|
|
111
|
-
|
|
116
|
+
diagnostic_info.append(f"Found via direct path: {script_path}")
|
|
117
|
+
except (TypeError, ValueError) as e:
|
|
118
|
+
diagnostic_info.append(f"Direct path conversion failed: {e}")
|
|
112
119
|
|
|
113
120
|
# If direct path didn't work, try as_file() for zip/pex installs
|
|
114
121
|
if script_path is None:
|
|
115
122
|
try:
|
|
116
123
|
temp_script_context = resources.as_file(script_resource)
|
|
117
124
|
script_path = temp_script_context.__enter__()
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
125
|
+
diagnostic_info.append(f"Found via as_file() (temp): {script_path}")
|
|
126
|
+
except (TypeError, ValueError, OSError) as e:
|
|
127
|
+
diagnostic_info.append(f"as_file() extraction failed: {e}")
|
|
128
|
+
else:
|
|
129
|
+
# Try to list what's actually in the scripts directory
|
|
130
|
+
try:
|
|
131
|
+
scripts_dir = package / "scripts"
|
|
132
|
+
if scripts_dir.is_dir():
|
|
133
|
+
available_files = list(scripts_dir.iterdir())
|
|
134
|
+
diagnostic_info.append(f"Scripts directory exists. Available files: {[f.name for f in available_files]}")
|
|
135
|
+
else:
|
|
136
|
+
diagnostic_info.append("Scripts directory does not exist in package")
|
|
137
|
+
except Exception as e:
|
|
138
|
+
diagnostic_info.append(f"Could not list scripts directory: {e}")
|
|
139
|
+
except (ImportError, ModuleNotFoundError, TypeError, AttributeError, OSError) as e:
|
|
140
|
+
diagnostic_info.append(f"importlib.resources failed: {type(e).__name__}: {e}")
|
|
122
141
|
|
|
123
142
|
# Fallback: try relative to package directory
|
|
124
143
|
if script_path is None:
|
|
125
144
|
package_dir = Path(__file__).parent
|
|
126
145
|
fallback_script = package_dir / "scripts" / "get-next-version.cjs"
|
|
146
|
+
diagnostic_info.append(f"Checked fallback path: {fallback_script}")
|
|
127
147
|
if fallback_script.exists():
|
|
128
148
|
script_path = fallback_script
|
|
149
|
+
diagnostic_info.append(f"Found via fallback: {script_path}")
|
|
150
|
+
else:
|
|
151
|
+
diagnostic_info.append(f"Fallback path does not exist")
|
|
129
152
|
|
|
130
153
|
if not script_path:
|
|
131
154
|
error_msg = "Could not locate get-next-version.cjs script"
|
|
155
|
+
error_msg += "\n\nDiagnostic information:"
|
|
156
|
+
for info in diagnostic_info:
|
|
157
|
+
error_msg += f"\n - {info}"
|
|
158
|
+
error_msg += (
|
|
159
|
+
"\n\nThis usually means the script was not included in the installed package."
|
|
160
|
+
"\nPlease ensure you're using the latest version of python-package-folder."
|
|
161
|
+
"\nIf the issue persists, report this as a bug."
|
|
162
|
+
)
|
|
132
163
|
print(f"Error: {error_msg}", file=sys.stderr)
|
|
133
164
|
return None, error_msg
|
|
134
165
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-package-folder
|
|
3
|
-
Version: 4.1.
|
|
3
|
+
Version: 4.1.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>
|
|
@@ -6,13 +6,13 @@ python_package_folder/finder.py,sha256=RPidZ7LKCFuQ_KgCFIZdHWPXsZIDor3M4C0hKeYW7
|
|
|
6
6
|
python_package_folder/manager.py,sha256=Z9RPg0ZQ7jZhmEXfCzX9OrD_oiA5p2Pnm5Y9tgW3ObQ,55970
|
|
7
7
|
python_package_folder/publisher.py,sha256=TSjdOvxvnWLbJCnduTK_xZBRfvsrq9kpEH-sfebeWkU,13507
|
|
8
8
|
python_package_folder/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
9
|
-
python_package_folder/python_package_folder.py,sha256=
|
|
9
|
+
python_package_folder/python_package_folder.py,sha256=cwc-o96qG3drhdhiTNomdR3jVOABLSP8T8rgtTxxXNE,23854
|
|
10
10
|
python_package_folder/subfolder_build.py,sha256=oH_KKLJIMByUZCl8y3AyohUO6Om0OvsIQ7Xg1fkd3jE,38782
|
|
11
11
|
python_package_folder/types.py,sha256=3yeSRR5p_3PDKEAaehW_RJ7NwJHexOIeA08bGaT1iSY,2368
|
|
12
12
|
python_package_folder/utils.py,sha256=lIkWsFKeAYAJ9TDUM99T4pUBHJVbUvCdUgkWQN-LUho,3111
|
|
13
13
|
python_package_folder/version.py,sha256=kIDP6S9trEfs9gj7lBYGxrWm4RPssRla24UtlO9Jkh4,9111
|
|
14
|
-
python_package_folder-4.1.
|
|
15
|
-
python_package_folder-4.1.
|
|
16
|
-
python_package_folder-4.1.
|
|
17
|
-
python_package_folder-4.1.
|
|
18
|
-
python_package_folder-4.1.
|
|
14
|
+
python_package_folder-4.1.2.dist-info/METADATA,sha256=VfbnD998xzZY883EYPQlKAgmWEocNeLl_FVm7YvBsGU,37517
|
|
15
|
+
python_package_folder-4.1.2.dist-info/WHEEL,sha256=QccIxa26bgl1E6uMy58deGWi-0aeIkkangHcxk2kWfw,87
|
|
16
|
+
python_package_folder-4.1.2.dist-info/entry_points.txt,sha256=ttu4wAhoYSHGhWQNercLz9IVTTpXxhVlRA9vSTvaLe0,91
|
|
17
|
+
python_package_folder-4.1.2.dist-info/licenses/LICENSE,sha256=vNgRJh8YiecqZoZld7TtwPI5I72HIymKD9g32fiJjCE,1073
|
|
18
|
+
python_package_folder-4.1.2.dist-info/RECORD,,
|
|
File without changes
|
{python_package_folder-4.1.1.dist-info → python_package_folder-4.1.2.dist-info}/entry_points.txt
RENAMED
|
File without changes
|
{python_package_folder-4.1.1.dist-info → python_package_folder-4.1.2.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|