From 7fb04c7d8fa664d66657961b216c3ad4fcce6786 Mon Sep 17 00:00:00 2001 From: Dion Moult Date: Thu, 18 Jul 2024 22:40:43 +1000 Subject: [PATCH] Wrap IOS make in venv --- src/ifcopenshell-python/Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ifcopenshell-python/Makefile b/src/ifcopenshell-python/Makefile index 9c5e608de8..b6fae42e48 100644 --- a/src/ifcopenshell-python/Makefile +++ b/src/ifcopenshell-python/Makefile @@ -109,6 +109,9 @@ endif mkdir -p dist/ifcopenshell cp -r ifcopenshell/* dist/ifcopenshell/ + cd dist/working && $(PYTHON) -m venv env + cd dist/working && . env/bin/activate && $(PIP) install build + cd dist/working && wget $(IOS_URL) cd dist/working && unzip ifcopenshell-python* cp -r dist/working/ifcopenshell/*ifcopenshell_wrapper* dist/ifcopenshell/ @@ -119,7 +122,7 @@ endif cp pyproject.toml pyproject.toml.bak $(SED) 's/version = "0.0.0"/version = "$(VERSION)"/' pyproject.toml $(SED) 's/version = "0.0.0"/version = "$(VERSION)"/' dist/ifcopenshell/__init__.py - python -m build + . dist/working/env/bin/activate && $(PYTHON) -m build mv pyproject.toml.bak pyproject.toml mv ../README.bak README.md cd dist && mv ifcopenshell-$(VERSION)-py3-none-any.whl ifcopenshell-$(VERSION)-$(PYVERSION)-none-$(PLATFORMTAG).whl