From 3a54e808f6f3b2bcc8eaf392854b98e8f29456ed Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Fri, 27 Feb 2026 16:55:42 +0500 Subject: [PATCH] dev_environment python - create user site packages folder if missing E.g. it might be missing if Python was just installed. Also print paths first before symlinking, making it easier to debug. --- src/ifcopenshell-python/scripts/dev_environment.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ifcopenshell-python/scripts/dev_environment.py b/src/ifcopenshell-python/scripts/dev_environment.py index db65020048..8058a58b92 100644 --- a/src/ifcopenshell-python/scripts/dev_environment.py +++ b/src/ifcopenshell-python/scripts/dev_environment.py @@ -11,6 +11,7 @@ import site from pathlib import Path SITE = Path(site.getusersitepackages()) +SITE.mkdir(parents=True, exist_ok=True) REPO_PATH = Path(__file__).parent.parent.parent.parent REPO_PATH_SRC = REPO_PATH / "src" assert REPO_PATH_SRC.exists(), f"'{REPO_PATH_SRC}' doesn't exist." @@ -36,8 +37,8 @@ for package, repo_package_path in packages.items(): if package_path.exists(): # I guess it's a directory. shutil.rmtree(package_path) - package_path.symlink_to(repo_package_path, True) print(f"Symlinking {package_path} -> {repo_package_path}") + package_path.symlink_to(repo_package_path, True) PACKAGE_PATH = SITE / "ifcopenshell"