MCPcopy Index your code
hub / github.com/BasicProtein/AugmentCode-Free / build_python_packages

Method build_python_packages

build.py:361–391  ·  view source on GitHub ↗

Build wheel and source distribution packages

(self)

Source from the content-addressed store, hash-verified

359 self.built_packages = []
360
361 def build_python_packages(self) -> bool:
362 """Build wheel and source distribution packages"""
363 logger.step("Building Python Packages")
364
365 try:
366 # Build both wheel and sdist
367 run_command("python -m build --wheel --sdist --outdir dist", timeout=300)
368
369 # Verify packages were created
370 wheel_files = list(self.build_env.dist_dir.glob("*.whl"))
371 sdist_files = list(self.build_env.dist_dir.glob("*.tar.gz"))
372
373 if not wheel_files:
374 logger.error("No wheel file generated")
375 return False
376
377 if not sdist_files:
378 logger.error("No source distribution generated")
379 return False
380
381 # Log built packages
382 for package_file in wheel_files + sdist_files:
383 size = package_file.stat().st_size
384 logger.success(f"Built: {package_file.name} ({size:,} bytes)")
385 self.built_packages.append(package_file)
386
387 return True
388
389 except BuildError as e:
390 logger.error(f"Python package build failed: {e}")
391 return False
392
393class ExecutableBuilder:
394 """Windows executable building with PyInstaller"""

Callers

nothing calls this directly

Calls 4

run_commandFunction · 0.85
stepMethod · 0.80
errorMethod · 0.80
successMethod · 0.80

Tested by

no test coverage detected