From 60519e8fed24153a148236f0f939ebc22bc3f516 Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Fri, 13 Mar 2026 14:58:23 +0500 Subject: [PATCH] ifcopenshell dev_environment - include all packages --- .../scripts/dev_environment.py | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/ifcopenshell-python/scripts/dev_environment.py b/src/ifcopenshell-python/scripts/dev_environment.py index 8058a58b92..b958369ba1 100644 --- a/src/ifcopenshell-python/scripts/dev_environment.py +++ b/src/ifcopenshell-python/scripts/dev_environment.py @@ -17,8 +17,18 @@ REPO_PATH_SRC = REPO_PATH / "src" assert REPO_PATH_SRC.exists(), f"'{REPO_PATH_SRC}' doesn't exist." packages = { + "bcf": REPO_PATH_SRC / "bcf" / "bcf", + "bsdd.py": REPO_PATH_SRC / "bsdd" / "bsdd.py", + "ifc4d": REPO_PATH_SRC / "ifc4d" / "ifc4d", + "ifc5d": REPO_PATH_SRC / "ifc5d" / "ifc5d", + "ifccityjson": REPO_PATH_SRC / "ifccityjson" / "ifccityjson", + "ifcclash": REPO_PATH_SRC / "ifcclash" / "ifcclash", + "ifccsv.py": REPO_PATH_SRC / "ifccsv" / "ifccsv.py", + "ifcdiff.py": REPO_PATH_SRC / "ifcdiff" / "ifcdiff.py", + "ifcfm": REPO_PATH_SRC / "ifcfm" / "ifcfm", "ifcopenshell": REPO_PATH_SRC / "ifcopenshell-python" / "ifcopenshell", "ifcpatch": REPO_PATH_SRC / "ifcpatch" / "ifcpatch", + "ifctester": REPO_PATH_SRC / "ifctester" / "ifctester", } @@ -35,10 +45,12 @@ for package, repo_package_path in packages.items(): continue package_path.unlink() if package_path.exists(): - # I guess it's a directory. - shutil.rmtree(package_path) + if package_path.is_dir(): + shutil.rmtree(package_path) + else: + package_path.unlink() print(f"Symlinking {package_path} -> {repo_package_path}") - package_path.symlink_to(repo_package_path, True) + package_path.symlink_to(repo_package_path, target_is_directory=repo_package_path.is_dir()) PACKAGE_PATH = SITE / "ifcopenshell"