python-package-folder 7.0.0__py3-none-any.whl → 7.1.0__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.
@@ -1142,6 +1142,26 @@ class BuildManager:
1142
1142
  else:
1143
1143
  print("No external dependencies found\n")
1144
1144
 
1145
+ # Verify temporary package directory exists if using subfolder build
1146
+ if self.subfolder_config and self.subfolder_config._temp_package_dir:
1147
+ temp_dir = self.subfolder_config._temp_package_dir
1148
+ if not temp_dir.exists():
1149
+ raise RuntimeError(
1150
+ f"Temporary package directory does not exist: {temp_dir}. "
1151
+ "This should have been created during prepare_build()."
1152
+ )
1153
+ # Verify it contains Python files
1154
+ py_files = list(temp_dir.glob("*.py"))
1155
+ if not py_files:
1156
+ raise RuntimeError(
1157
+ f"Temporary package directory exists but contains no Python files: {temp_dir}"
1158
+ )
1159
+ # Verify __init__.py exists
1160
+ if not (temp_dir / "__init__.py").exists():
1161
+ raise RuntimeError(
1162
+ f"Temporary package directory missing __init__.py: {temp_dir}"
1163
+ )
1164
+
1145
1165
  print("Running build...")
1146
1166
  # Build command should run from project root to find pyproject.toml
1147
1167
  import os
@@ -1152,6 +1172,36 @@ class BuildManager:
1152
1172
  build_command()
1153
1173
  finally:
1154
1174
  os.chdir(original_cwd)
1175
+
1176
+ # Verify wheel contents after build (for subfolder builds)
1177
+ if self.subfolder_config and self.subfolder_config.package_name:
1178
+ import_name = self.subfolder_config.package_name.replace("-", "_")
1179
+ dist_dir = self.project_root / "dist"
1180
+ if dist_dir.exists():
1181
+ wheel_files = list(dist_dir.glob("*.whl"))
1182
+ if wheel_files:
1183
+ import zipfile
1184
+ wheel_file = wheel_files[0]
1185
+ try:
1186
+ with zipfile.ZipFile(wheel_file, "r") as wheel:
1187
+ file_names = wheel.namelist()
1188
+ package_files = [f for f in file_names if f.startswith(f"{import_name}/")]
1189
+ if not package_files:
1190
+ print(
1191
+ f"\nWARNING: Built wheel does not contain package directory '{import_name}/'. "
1192
+ f"Only found: {[f for f in file_names if '.dist-info' not in f][:10]}",
1193
+ file=sys.stderr,
1194
+ )
1195
+ else:
1196
+ print(
1197
+ f"\nVerified wheel contains package directory '{import_name}/' "
1198
+ f"with {len(package_files)} files"
1199
+ )
1200
+ except Exception as e:
1201
+ print(
1202
+ f"\nWARNING: Could not verify wheel contents: {e}",
1203
+ file=sys.stderr,
1204
+ )
1155
1205
 
1156
1206
  finally:
1157
1207
  print("\nCleaning up copied files...")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-package-folder
3
- Version: 7.0.0
3
+ Version: 7.1.0
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>
@@ -2,7 +2,7 @@ python_package_folder/__init__.py,sha256=DQt-uldOEKfh0MUqCvKdeNKOnpuOvpb7blYvXMy
2
2
  python_package_folder/__main__.py,sha256=a-__-VLhYw-J7S7CsHdhtEvQr3RiAZxiYDvKhKTgMX4,291
3
3
  python_package_folder/analyzer.py,sha256=8DCc5AaVpYF9qh8NbMJ5igeW5AVYnQqy_XqRtl16ZLc,15981
4
4
  python_package_folder/finder.py,sha256=RPidZ7LKCFuQ_KgCFIZdHWPXsZIDor3M4C0hKeYW7EI,11799
5
- python_package_folder/manager.py,sha256=erX8uPu3KA593wsSH9o15O8MNc6mwIZgGGqUJf7Z5i0,59423
5
+ python_package_folder/manager.py,sha256=k4nvGmH2iEwQFKNx6gcokZ3VbkUMf_F_bDhbBaN2e9c,62246
6
6
  python_package_folder/publisher.py,sha256=fmf3l0zMY9CD49gurxlXyvm9mOP0FzDjmiSt0yDqt1M,18813
7
7
  python_package_folder/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
8
  python_package_folder/python_package_folder.py,sha256=QZ-vdOZ40wF-eGbp39JotDhMwIhhT3Z_sC5obQj3i4s,17024
@@ -11,8 +11,8 @@ python_package_folder/types.py,sha256=3yeSRR5p_3PDKEAaehW_RJ7NwJHexOIeA08bGaT1iS
11
11
  python_package_folder/utils.py,sha256=b6Ukcc0fctXdxS5zhGLS86kqn0vz1yOEK7XjCY9fjfY,5621
12
12
  python_package_folder/version.py,sha256=kIDP6S9trEfs9gj7lBYGxrWm4RPssRla24UtlO9Jkh4,9111
13
13
  python_package_folder/version_calculator.py,sha256=_gcc8IbMjt27UxePcc7RZlFTMCG3AGnRI_-Mp_4qRG0,39568
14
- python_package_folder-7.0.0.dist-info/METADATA,sha256=mGdHt_HrzSDGj-tBuvwG2axyjGUxoAIZhTLrgPCBPZQ,7838
15
- python_package_folder-7.0.0.dist-info/WHEEL,sha256=QccIxa26bgl1E6uMy58deGWi-0aeIkkangHcxk2kWfw,87
16
- python_package_folder-7.0.0.dist-info/entry_points.txt,sha256=ttu4wAhoYSHGhWQNercLz9IVTTpXxhVlRA9vSTvaLe0,91
17
- python_package_folder-7.0.0.dist-info/licenses/LICENSE,sha256=vNgRJh8YiecqZoZld7TtwPI5I72HIymKD9g32fiJjCE,1073
18
- python_package_folder-7.0.0.dist-info/RECORD,,
14
+ python_package_folder-7.1.0.dist-info/METADATA,sha256=W-x_dK9Nn6XdvPplWPoC7_8qiGyXYw4nfQusdccb7tM,7838
15
+ python_package_folder-7.1.0.dist-info/WHEEL,sha256=QccIxa26bgl1E6uMy58deGWi-0aeIkkangHcxk2kWfw,87
16
+ python_package_folder-7.1.0.dist-info/entry_points.txt,sha256=ttu4wAhoYSHGhWQNercLz9IVTTpXxhVlRA9vSTvaLe0,91
17
+ python_package_folder-7.1.0.dist-info/licenses/LICENSE,sha256=vNgRJh8YiecqZoZld7TtwPI5I72HIymKD9g32fiJjCE,1073
18
+ python_package_folder-7.1.0.dist-info/RECORD,,