full compile system build. 2. beam_spliter, MMI and spiral classes added
Build and Release mxPIC Wheels / Build on ubuntu-latest (release) Failing after 7m8s
Build and Release mxPIC Wheels / Build on windows-latest (release) Has been cancelled
Build and Release mxPIC Wheels / Publish to GitHub Releases (release) Has been cancelled

This commit is contained in:
2026-05-07 17:10:00 +08:00
parent dda69d5b84
commit d7c19ed782
115 changed files with 5448 additions and 509 deletions
+16 -3
View File
@@ -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")):