mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-10-02 21:12:07 +00:00
dev_environment.py: add --skip-binaries flag
This commit is contained in:
@@ -14,6 +14,7 @@ Example usage:
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
import argparse
|
||||||
import shutil
|
import shutil
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
@@ -26,6 +27,17 @@ if sys.platform not in available_platforms:
|
|||||||
print(f"Currently only available on {', '.join(available_platforms)}. Not available on {sys.platform}.")
|
print(f"Currently only available on {', '.join(available_platforms)}. Not available on {sys.platform}.")
|
||||||
exit(1)
|
exit(1)
|
||||||
|
|
||||||
|
parser = argparse.ArgumentParser(description=__doc__)
|
||||||
|
parser.add_argument(
|
||||||
|
"--skip-binaries",
|
||||||
|
action="store_true",
|
||||||
|
help=(
|
||||||
|
"Skip copying compiled dependencies (e.g. ifcopenshell_wrapper) to the repo. "
|
||||||
|
"Useful if you already have the latest binaries in the repo and don't want them to be overridden."
|
||||||
|
),
|
||||||
|
)
|
||||||
|
args = parser.parse_args()
|
||||||
|
|
||||||
# ---------------------------
|
# ---------------------------
|
||||||
# SETTINGS.
|
# SETTINGS.
|
||||||
# ---------------------------
|
# ---------------------------
|
||||||
@@ -124,6 +136,9 @@ def main() -> None:
|
|||||||
path.unlink()
|
path.unlink()
|
||||||
subprocess.check_call(("git", "checkout", "--", symlinks_glob), cwd=REPO_PATH)
|
subprocess.check_call(("git", "checkout", "--", symlinks_glob), cwd=REPO_PATH)
|
||||||
|
|
||||||
|
if args.skip_binaries:
|
||||||
|
print("Skipping copying compiled dependencies to the repo...")
|
||||||
|
else:
|
||||||
print("Copying compiled dependencies to the repo...")
|
print("Copying compiled dependencies to the repo...")
|
||||||
dest = REPO_PATH / "src" / "ifcopenshell-python" / "ifcopenshell"
|
dest = REPO_PATH / "src" / "ifcopenshell-python" / "ifcopenshell"
|
||||||
for path in PACKAGE_PATH.glob("ifcopenshell/*_wrapper*"):
|
for path in PACKAGE_PATH.glob("ifcopenshell/*_wrapper*"):
|
||||||
|
|||||||
Reference in New Issue
Block a user