mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-11 02:02:22 +00:00
makefiles - windows support
This commit is contained in:
+41
-37
@@ -20,8 +20,12 @@ PYTHON:=python3.11
|
||||
PIP:=pip3.11
|
||||
PATCH:=patch
|
||||
SED:=sed -i
|
||||
VENV_ACTIVATE:=bin/activate
|
||||
|
||||
ifeq ($(OS),Windows_NT)
|
||||
HOSTOS:=win
|
||||
PYTHON:=python
|
||||
VENV_ACTIVATE:=Scripts/activate
|
||||
else
|
||||
UNAME_S:=$(shell uname -s)
|
||||
ifeq ($(UNAME_S),Linux)
|
||||
@@ -105,8 +109,8 @@ endif
|
||||
cp -r blenderbim build/
|
||||
|
||||
# To scope any build-time dependencies
|
||||
cd build && $(PYTHON) -m venv env && . env/bin/activate && $(PIP) install build
|
||||
cd build && . env/bin/activate && $(PIP) install wheel
|
||||
cd build && $(PYTHON) -m venv env && . env/$(VENV_ACTIVATE) && $(PIP) install build
|
||||
cd build && . env/$(VENV_ACTIVATE) && $(PIP) install wheel
|
||||
|
||||
mkdir -p build/wheels
|
||||
# Provides IfcOpenShell Python functionality
|
||||
@@ -123,69 +127,69 @@ endif
|
||||
cd ../ifc4d && make dist && cp dist/*.whl ../blenderbim/build/wheels/
|
||||
cd ../ifc5d && make dist && cp dist/*.whl ../blenderbim/build/wheels/
|
||||
cd ../ifccityjson && make dist && cp dist/*.whl ../blenderbim/build/wheels/
|
||||
cd build && . env/bin/activate && $(PIP) download GitPython --dest=./wheels
|
||||
cd build && . env/$(VENV_ACTIVATE) && $(PIP) download GitPython --dest=./wheels
|
||||
# Provides audio playback for costing
|
||||
# This is a REALLY IMPORTANT feature
|
||||
cd build && . env/bin/activate && $(PIP) wheel git+https://github.com/Andrej730/aud.git --wheel-dir=../wheels
|
||||
cd build && . env/$(VENV_ACTIVATE) && $(PIP) wheel git+https://github.com/Andrej730/aud.git --wheel-dir=../wheels
|
||||
# IfcOpenShell dependency - support for new typing features
|
||||
cd build && . env/bin/activate && $(PIP) download typing_extensions --dest=./wheels
|
||||
cd build && . env/$(VENV_ACTIVATE) && $(PIP) download typing_extensions --dest=./wheels
|
||||
# Required by IfcCSV
|
||||
cd build && . env/bin/activate && $(PIP) download pandas $(PYPI_PLATFORM) --python-version $(PYPI_VERSION) --implementation $(PYPI_IMP) --only-binary=:all: --dest=./wheels
|
||||
cd build && . env/$(VENV_ACTIVATE) && $(PIP) download pandas $(PYPI_PLATFORM) --python-version $(PYPI_VERSION) --implementation $(PYPI_IMP) --only-binary=:all: --dest=./wheels
|
||||
# Pandas ships with very heavy tests
|
||||
# cd build/site-packages/pandas && rm -rf tests
|
||||
cd build && . env/bin/activate && $(PIP) download openpyxl --dest=./wheels
|
||||
cd build && . env/$(VENV_ACTIVATE) && $(PIP) download openpyxl --dest=./wheels
|
||||
# odfpy doesn't come with its own wheel, so whee'l (get it?) create it ourselves!
|
||||
cd build && . env/bin/activate && $(PIP) wheel odfpy --wheel-dir=./wheels
|
||||
cd build && . env/$(VENV_ACTIVATE) && $(PIP) wheel odfpy --wheel-dir=./wheels
|
||||
# Required by IFCCityJSON
|
||||
cd build && . env/bin/activate && $(PIP) download cjio --dest=./wheels
|
||||
cd build && . env/$(VENV_ACTIVATE) && $(PIP) download cjio --dest=./wheels
|
||||
# Provides express rule validation for ifcopenshell.validate
|
||||
cd build && . env/bin/activate && $(PIP) download pytest --dest=./wheels
|
||||
cd build && . env/$(VENV_ACTIVATE) && $(PIP) download pytest --dest=./wheels
|
||||
# Provides Brickschema functionality
|
||||
# Is not platform specific but has platform specific dependencies.
|
||||
cd build && . env/bin/activate && $(PIP) download "brickschema[persistence]==0.7.6a2" $(PYPI_PLATFORM) --python-version $(PYPI_VERSION) --implementation $(PYPI_IMP) --only-binary=:all: --dest=./wheels
|
||||
cd build && . env/$(VENV_ACTIVATE) && $(PIP) download "brickschema[persistence]==0.7.6a2" $(PYPI_PLATFORM) --python-version $(PYPI_VERSION) --implementation $(PYPI_IMP) --only-binary=:all: --dest=./wheels
|
||||
# Required for SVG to DXF conversion
|
||||
cd build && . env/bin/activate && $(PIP) download ezdxf $(PYPI_PLATFORM) --python-version $(PYPI_VERSION) --implementation $(PYPI_IMP) --only-binary=:all: --dest=./wheels
|
||||
cd build && . env/$(VENV_ACTIVATE) && $(PIP) download ezdxf $(PYPI_PLATFORM) --python-version $(PYPI_VERSION) --implementation $(PYPI_IMP) --only-binary=:all: --dest=./wheels
|
||||
# Required by bcf
|
||||
cd build && . env/bin/activate && $(PIP) download xsdata --dest=./wheels
|
||||
cd build && . env/bin/activate && $(PIP) download xmlschema --dest=./wheels
|
||||
cd build && . env/bin/activate && $(PIP) download elementpath --dest=./wheels
|
||||
cd build && . env/bin/activate && $(PIP) download six --dest=./wheels
|
||||
cd build && . env/$(VENV_ACTIVATE) && $(PIP) download xsdata --dest=./wheels
|
||||
cd build && . env/$(VENV_ACTIVATE) && $(PIP) download xmlschema --dest=./wheels
|
||||
cd build && . env/$(VENV_ACTIVATE) && $(PIP) download elementpath --dest=./wheels
|
||||
cd build && . env/$(VENV_ACTIVATE) && $(PIP) download six --dest=./wheels
|
||||
# Required by drawing module
|
||||
cd build && . env/bin/activate && $(PIP) download lxml $(PYPI_PLATFORM) --python-version $(PYPI_VERSION) --implementation $(PYPI_IMP) --only-binary=:all: --dest=./wheels
|
||||
cd build && . env/$(VENV_ACTIVATE) && $(PIP) download lxml $(PYPI_PLATFORM) --python-version $(PYPI_VERSION) --implementation $(PYPI_IMP) --only-binary=:all: --dest=./wheels
|
||||
# Required by qto and drawing module
|
||||
cd build && . env/bin/activate && $(PIP) download shapely $(PYPI_PLATFORM) --python-version $(PYPI_VERSION) --implementation $(PYPI_IMP) --only-binary=:all: --dest=./wheels
|
||||
cd build && . env/$(VENV_ACTIVATE) && $(PIP) download shapely $(PYPI_PLATFORM) --python-version $(PYPI_VERSION) --implementation $(PYPI_IMP) --only-binary=:all: --dest=./wheels
|
||||
# Required by the BIM type manager thumbnail generator
|
||||
cd build && . env/bin/activate && $(PIP) download pillow $(PYPI_PLATFORM) --python-version $(PYPI_VERSION) --implementation $(PYPI_IMP) --only-binary=:all: --dest=./wheels
|
||||
cd build && . env/$(VENV_ACTIVATE) && $(PIP) download pillow $(PYPI_PLATFORM) --python-version $(PYPI_VERSION) --implementation $(PYPI_IMP) --only-binary=:all: --dest=./wheels
|
||||
# Provides mustache templating in construction docs and web UI data
|
||||
cd build && . env/bin/activate && $(PIP) download pystache --dest=./wheels
|
||||
cd build && . env/$(VENV_ACTIVATE) && $(PIP) download pystache --dest=./wheels
|
||||
# Provides SVG export in construction documentation
|
||||
cd build && . env/bin/activate && $(PIP) download svgwrite --dest=./wheels
|
||||
cd build && . env/$(VENV_ACTIVATE) && $(PIP) download svgwrite --dest=./wheels
|
||||
# Provides fuzzy date parsing for construction sequencing
|
||||
cd build && . env/bin/activate && $(PIP) download python-dateutil --dest=./wheels
|
||||
cd build && . env/$(VENV_ACTIVATE) && $(PIP) download python-dateutil --dest=./wheels
|
||||
# Provides duration parsing for construction sequencing
|
||||
cd build && . env/bin/activate && $(PIP) download isodate --dest=./wheels
|
||||
cd build && . env/$(VENV_ACTIVATE) && $(PIP) download isodate --dest=./wheels
|
||||
# Provides networkx graph analysis for project dependency calculations
|
||||
cd build && . env/bin/activate && $(PIP) download networkx --dest=./wheels
|
||||
cd build && . env/$(VENV_ACTIVATE) && $(PIP) download networkx --dest=./wheels
|
||||
# Required by IFCDiff
|
||||
cd build && . env/bin/activate && $(PIP) download deepdiff --dest=./wheels
|
||||
cd build && . env/$(VENV_ACTIVATE) && $(PIP) download deepdiff --dest=./wheels
|
||||
# Required by IFCCSV and ifcopenshell.util.selector
|
||||
cd build && . env/bin/activate && $(PIP) download lark --dest=./wheels
|
||||
cd build && . env/$(VENV_ACTIVATE) && $(PIP) download lark --dest=./wheels
|
||||
# Required by IFC4D
|
||||
cd build && . env/bin/activate && $(PIP) download PyP6Xer --dest=./wheels
|
||||
cd build && . env/$(VENV_ACTIVATE) && $(PIP) download PyP6Xer --dest=./wheels
|
||||
# Required by web module
|
||||
# Is not platform specific but has platform specific dependencies.
|
||||
cd build && . env/bin/activate && $(PIP) download python-socketio[asyncio_client] $(PYPI_PLATFORM) --python-version $(PYPI_VERSION) --implementation $(PYPI_IMP) --only-binary=:all: --dest=./wheels
|
||||
cd build && . env/bin/activate && $(PIP) download aiohttp $(PYPI_PLATFORM) --python-version $(PYPI_VERSION) --implementation $(PYPI_IMP) --only-binary=:all: --dest=./wheels
|
||||
cd build && . env/$(VENV_ACTIVATE) && $(PIP) download python-socketio[asyncio_client] $(PYPI_PLATFORM) --python-version $(PYPI_VERSION) --implementation $(PYPI_IMP) --only-binary=:all: --dest=./wheels
|
||||
cd build && . env/$(VENV_ACTIVATE) && $(PIP) download aiohttp $(PYPI_PLATFORM) --python-version $(PYPI_VERSION) --implementation $(PYPI_IMP) --only-binary=:all: --dest=./wheels
|
||||
# Required by light module
|
||||
cd build && . env/bin/activate && $(PIP) download pytz --dest=./wheels
|
||||
cd build && . env/bin/activate && $(PIP) download tzfpy $(PYPI_PLATFORM) --python-version $(PYPI_VERSION) --implementation $(PYPI_IMP) --only-binary=:all: --dest=./wheels
|
||||
cd build && . env/$(VENV_ACTIVATE) && $(PIP) download pytz --dest=./wheels
|
||||
cd build && . env/$(VENV_ACTIVATE) && $(PIP) download tzfpy $(PYPI_PLATFORM) --python-version $(PYPI_VERSION) --implementation $(PYPI_IMP) --only-binary=:all: --dest=./wheels
|
||||
# pyradiance is using different platform versions than defaults in our makefile.
|
||||
ifeq ($(PLATFORM), linux)
|
||||
cd build && . env/bin/activate && $(PIP) download pyradiance --platform manylinux_2_35_x86_64 --python-version $(PYPI_VERSION) --implementation $(PYPI_IMP) --only-binary=:all: --dest=./wheels
|
||||
cd build && . env/$(VENV_ACTIVATE) && $(PIP) download pyradiance --platform manylinux_2_35_x86_64 --python-version $(PYPI_VERSION) --implementation $(PYPI_IMP) --only-binary=:all: --dest=./wheels
|
||||
else ifeq ($(PLATFORM), macos)
|
||||
cd build && . env/bin/activate && $(PIP) download pyradiance --platform macosx_10_13_x86_64 --python-version $(PYPI_VERSION) --implementation $(PYPI_IMP) --only-binary=:all: --dest=./wheels
|
||||
cd build && . env/$(VENV_ACTIVATE) && $(PIP) download pyradiance --platform macosx_10_13_x86_64 --python-version $(PYPI_VERSION) --implementation $(PYPI_IMP) --only-binary=:all: --dest=./wheels
|
||||
else
|
||||
cd build && . env/bin/activate && $(PIP) download pyradiance $(PYPI_PLATFORM) --python-version $(PYPI_VERSION) --implementation $(PYPI_IMP) --only-binary=:all: --dest=./wheels
|
||||
cd build && . env/$(VENV_ACTIVATE) && $(PIP) download pyradiance $(PYPI_PLATFORM) --python-version $(PYPI_VERSION) --implementation $(PYPI_IMP) --only-binary=:all: --dest=./wheels
|
||||
endif
|
||||
|
||||
# Provides jsgantt-improved supports for web-based construction sequencing gantt charts
|
||||
@@ -196,7 +200,7 @@ endif
|
||||
cd build && wget https://github.com/IFCJSON-Team/IFC2JSON_python/archive/master.zip
|
||||
cd build && unzip master.zip && rm master.zip
|
||||
# IFCJSON doesn't have pyproject.toml, so we use python command.
|
||||
cd build && . env/bin/activate && cd IFC2JSON_python-master/file_converters && \
|
||||
cd build && . env/$(VENV_ACTIVATE) && cd IFC2JSON_python-master/file_converters && \
|
||||
$(PYTHON) -c "from setuptools import setup; \
|
||||
setup( \
|
||||
name='ifcjson', \
|
||||
@@ -215,7 +219,7 @@ endif
|
||||
# Required for hipped roof generation
|
||||
cd build && wget https://github.com/prochitecture/bpypolyskel/archive/refs/heads/master.zip
|
||||
cd build && unzip master.zip && rm master.zip
|
||||
cd build && . env/bin/activate && cd bpypolyskel-master && \
|
||||
cd build && . env/$(VENV_ACTIVATE) && cd bpypolyskel-master && \
|
||||
$(PYTHON) -c "from setuptools import setup; \
|
||||
setup( \
|
||||
name='bpypolyskel', \
|
||||
@@ -249,7 +253,7 @@ endif
|
||||
|
||||
# Provides BlenderBIM Add-on functionality
|
||||
$(SED) 's/version = "0.0.0"/version = "$(VERSION)"/' build/pyproject.toml
|
||||
cd build && . env/bin/activate && $(PYTHON) -m build
|
||||
cd build && . env/$(VENV_ACTIVATE) && $(PYTHON) -m build
|
||||
cp build/dist/*.whl build/wheels/
|
||||
mv build/wheels/*.whl build/blenderbim/wheels/
|
||||
|
||||
|
||||
+7
-2
@@ -2,15 +2,20 @@ PYTHON:=python3.11
|
||||
PIP:=pip3.11
|
||||
VERSION:=$(shell cat ../../VERSION)
|
||||
SED:=sed -i
|
||||
VENV_BIN:=bin
|
||||
|
||||
ifeq ($(OS),Windows_NT)
|
||||
PYTHON:=python
|
||||
PIP:=pip
|
||||
VENV_BIN:=Scripts
|
||||
endif
|
||||
ifeq ($(UNAME_S),Darwin)
|
||||
SED:=sed -i '' -e
|
||||
PYTHON:=python3
|
||||
endif
|
||||
|
||||
VENV_ACTIVATE:=$(VENV_BIN)/activate
|
||||
|
||||
.PHONY: dist
|
||||
dist:
|
||||
rm -rf build
|
||||
@@ -24,7 +29,7 @@ ifdef IS_MODULE
|
||||
else
|
||||
$(SED) 's/version = "0.0.0"/version = "$(VERSION)"/' build/$(PACKAGE_NAME)/__init__.py
|
||||
endif
|
||||
cd build && $(PYTHON) -m venv env && . env/bin/activate && $(PIP) install build
|
||||
cd build && . env/bin/activate && $(PYTHON) -m build
|
||||
cd build && $(PYTHON) -m venv env && . env/$(VENV_ACTIVATE) && $(PIP) install build
|
||||
cd build && . env/$(VENV_ACTIVATE) && $(PYTHON) -m build
|
||||
cp build/dist/*.whl dist/
|
||||
rm -rf build
|
||||
|
||||
@@ -36,10 +36,10 @@ dist:
|
||||
cp pyproject.toml build/
|
||||
$(SED) 's/version = "0.0.0"/version = "$(VERSION)"/' build/pyproject.toml
|
||||
$(SED) 's/version = "0.0.0"/version = "$(VERSION)"/' build/$(PACKAGE_NAME)/__init__.py
|
||||
cd build && $(PYTHON) -m venv env && . env/bin/activate && $(PIP) install build
|
||||
cd build && . env/bin/activate && $(PIP) install pybabel
|
||||
cd build && . env/bin/activate && $(PIP) install babel
|
||||
cd build && . env/bin/activate && ./env/bin/pybabel compile -d ./bimtester/locale/
|
||||
cd build && . env/bin/activate && $(PYTHON) -m build
|
||||
cd build && $(PYTHON) -m venv env && . env/$(VENV_ACTIVATE) && $(PIP) install build
|
||||
cd build && . env/$(VENV_ACTIVATE) && $(PIP) install pybabel
|
||||
cd build && . env/$(VENV_ACTIVATE) && $(PIP) install babel
|
||||
cd build && . env/$(VENV_ACTIVATE) && ./env/$(VENV_BIN)/pybabel compile -d ./bimtester/locale/
|
||||
cd build && . env/$(VENV_ACTIVATE) && $(PYTHON) -m build
|
||||
cp build/dist/*.whl dist/
|
||||
rm -rf build
|
||||
|
||||
@@ -5,8 +5,12 @@ PLATFORM:=linux64
|
||||
PYTHON:=python3.11
|
||||
PIP:=pip3.11
|
||||
SED:=sed -i
|
||||
VENV_ACTIVATE:=bin/activate
|
||||
|
||||
ifeq ($(OS),Windows_NT)
|
||||
HOSTOS:=win
|
||||
PYTHON:=python
|
||||
VENV_ACTIVATE:=Scripts/activate
|
||||
else
|
||||
UNAME_S:=$(shell uname -s)
|
||||
ifeq ($(UNAME_S),Linux)
|
||||
@@ -119,8 +123,8 @@ endif
|
||||
$(SED) 's/version = "0.0.0"/version = "$(VERSION)"/' build/pyproject.toml
|
||||
$(SED) 's/version = "0.0.0"/version = "$(VERSION)"/' build/ifcopenshell/__init__.py
|
||||
|
||||
cd build && $(PYTHON) -m venv env && . env/bin/activate && $(PIP) install build
|
||||
cd build && . env/bin/activate && $(PYTHON) -m build
|
||||
cd build && $(PYTHON) -m venv env && . env/$(VENV_ACTIVATE) && $(PIP) install build
|
||||
cd build && . env/$(VENV_ACTIVATE) && $(PYTHON) -m build
|
||||
|
||||
mv build/dist/ifcopenshell-$(VERSION)-py3-none-any.whl dist/ifcopenshell-$(VERSION)-$(PYVERSION)-none-$(PLATFORMTAG).whl
|
||||
rm -rf build
|
||||
|
||||
Reference in New Issue
Block a user