full compile system build. 2. beam_spliter, MMI and spiral classes added
This commit is contained in:
+16
-3
@@ -6,7 +6,20 @@ from pathlib import Path
|
||||
def build_and_harvest():
|
||||
src_dir = Path("mxpic")
|
||||
release_dir = Path("mxpic_release/mxpic")
|
||||
|
||||
print("🧠 Generating IDE Stub Files (.pyi)...")
|
||||
|
||||
# 1. Run stubgen on the mxpic directory
|
||||
# -o . outputs the files directly next to their .py counterparts
|
||||
try:
|
||||
subprocess.run(["stubgen", "./mxpic", "-o", "."], check=True)
|
||||
print("✅ Stubs generated successfully.")
|
||||
except subprocess.CalledProcessError:
|
||||
print("❌ Failed to generate stubs. Is mypy installed?")
|
||||
return
|
||||
|
||||
print("🚀 Starting Wheel Build Process...")
|
||||
|
||||
print("🧹 Cleaning old builds...")
|
||||
if release_dir.parent.exists():
|
||||
shutil.rmtree(release_dir.parent)
|
||||
@@ -35,12 +48,12 @@ def build_and_harvest():
|
||||
file_path = current_root / file
|
||||
|
||||
# Copy compiled binaries (.so for Linux/WSL, .pyd for Windows)
|
||||
if file.endswith((".so", ".pyd")):
|
||||
if file.endswith((".so", ".pyd", ".pyi")):
|
||||
shutil.move(file_path, target_dir / file)
|
||||
|
||||
# Copy __init__.py files so Python recognizes the packages
|
||||
elif file == "__init__.py":
|
||||
shutil.copy2(file_path, target_dir / file)
|
||||
# elif file == "__init__.py":
|
||||
# shutil.copy2(file_path, target_dir / file)
|
||||
|
||||
# (Optional) Copy non-code assets like config files or templates
|
||||
elif file.endswith((".json", ".yaml", ".yml")):
|
||||
|
||||
Reference in New Issue
Block a user