mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-22 16:31:10 +00:00
Separate build/dist dir for bbim makefile
This commit is contained in:
@@ -40,18 +40,22 @@ jobs:
|
|||||||
- {
|
- {
|
||||||
name: "Windows Build",
|
name: "Windows Build",
|
||||||
short_name: win,
|
short_name: win,
|
||||||
|
blender_platform: windows-x64,
|
||||||
}
|
}
|
||||||
- {
|
- {
|
||||||
name: "Linux Build",
|
name: "Linux Build",
|
||||||
short_name: linux
|
short_name: linux
|
||||||
|
blender_platform: linux-x64,
|
||||||
}
|
}
|
||||||
- {
|
- {
|
||||||
name: "MacOS Build",
|
name: "MacOS Build",
|
||||||
short_name: macos
|
short_name: macos
|
||||||
|
blender_platform: macos-x64,
|
||||||
}
|
}
|
||||||
- {
|
- {
|
||||||
name: "MacOS ARM Build",
|
name: "MacOS ARM Build",
|
||||||
short_name: macosm1
|
short_name: macosm1
|
||||||
|
blender_platform: macos-arm64,
|
||||||
}
|
}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
@@ -72,8 +76,8 @@ jobs:
|
|||||||
uses: svenstaro/upload-release-action@v2
|
uses: svenstaro/upload-release-action@v2
|
||||||
with:
|
with:
|
||||||
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
file: src/blenderbim/dist/blenderbim-${{steps.version.outputs.version}}.${{steps.date.outputs.date}}-${{ matrix.pyver }}-${{ matrix.config.short_name }}.zip
|
file: src/blenderbim/dist/blenderbim_${{ matrix.pyver }}-${{steps.version.outputs.version}}-${{steps.date.outputs.date}}-${{ matrix.config.blender_platform }}.zip
|
||||||
asset_name: blenderbim-${{steps.version.outputs.version}}.${{steps.date.outputs.date}}-${{ matrix.pyver }}-${{ matrix.config.short_name }}.zip
|
asset_name: blenderbim_${{ matrix.pyver }}-${{steps.version.outputs.version}}-${{steps.date.outputs.date}}-${{ matrix.config.blender_platform }}.zip
|
||||||
release_name: "blenderbim-${{steps.version.outputs.version}}.${{steps.date.outputs.date}} (unstable)"
|
release_name: "blenderbim-${{steps.version.outputs.version}}-${{steps.date.outputs.date}} (unstable)"
|
||||||
tag: "blenderbim-${{steps.version.outputs.version}}.${{steps.date.outputs.date}}"
|
tag: "blenderbim-${{steps.version.outputs.version}}.${{steps.date.outputs.date}}"
|
||||||
overwrite: true
|
overwrite: true
|
||||||
|
|||||||
+87
-98
@@ -99,108 +99,102 @@ dist:
|
|||||||
ifndef PLATFORM
|
ifndef PLATFORM
|
||||||
$(error PLATFORM is not set)
|
$(error PLATFORM is not set)
|
||||||
endif
|
endif
|
||||||
rm -rf dist
|
rm -rf build
|
||||||
mkdir -p dist/working
|
mkdir -p build
|
||||||
mkdir -p dist/blenderbim
|
mkdir -p dist
|
||||||
cp -r blenderbim/* dist/blenderbim/
|
cp -r blenderbim build/
|
||||||
|
|
||||||
# To scope any build-time dependencies
|
# To scope any build-time dependencies
|
||||||
cd dist/working && $(PYTHON) -m venv env
|
cd build && $(PYTHON) -m venv env && . env/bin/activate && $(PIP) install build
|
||||||
cd dist/working && . env/bin/activate && $(PIP) install build
|
cd build && . env/bin/activate && $(PIP) install wheel
|
||||||
cd dist/working && . env/bin/activate && $(PIP) install wheel
|
|
||||||
|
|
||||||
mkdir wheels
|
mkdir -p build/wheels
|
||||||
# Provides IfcOpenShell Python functionality
|
# Provides IfcOpenShell Python functionality
|
||||||
cd ../ifcopenshell-python && make dist PLATFORM=$(PLATFORM)64 PYVERSION=$(PYVERSION) && cp dist/*.whl ../blenderbim/dist/blenderbim/wheels/
|
cd ../ifcopenshell-python && make dist PLATFORM=$(PLATFORM)64 PYVERSION=$(PYVERSION) && cp dist/*.whl ../blenderbim/build/wheels/
|
||||||
cd ../bcf && make dist && cp dist/*.whl ../blenderbim/dist/blenderbim/wheels/
|
cd ../bcf && make dist && cp dist/*.whl ../blenderbim/build/wheels/
|
||||||
cd ../ifcclash && make dist && cp dist/*.whl ../blenderbim/dist/blenderbim/wheels/
|
cd ../ifcclash && make dist && cp dist/*.whl ../blenderbim/build/wheels/
|
||||||
cd ../ifcbimtester && make dist && cp dist/*.whl ../blenderbim/dist/blenderbim/wheels/
|
cd ../ifcbimtester && make dist && cp dist/*.whl ../blenderbim/build/wheels/
|
||||||
cd ../ifctester && make dist && cp dist/*.whl ../blenderbim/dist/blenderbim/wheels/
|
cd ../ifctester && make dist && cp dist/*.whl ../blenderbim/build/wheels/
|
||||||
cd ../ifcfm && make dist && cp dist/*.whl ../blenderbim/dist/blenderbim/wheels/
|
cd ../ifcfm && make dist && cp dist/*.whl ../blenderbim/build/wheels/
|
||||||
cd ../bsdd && make dist && cp dist/*.whl ../blenderbim/dist/blenderbim/wheels/
|
cd ../bsdd && make dist && cp dist/*.whl ../blenderbim/build/wheels/
|
||||||
cd ../ifcdiff && make dist && cp dist/*.whl ../blenderbim/dist/blenderbim/wheels/
|
cd ../ifcdiff && make dist && cp dist/*.whl ../blenderbim/build/wheels/
|
||||||
cd ../ifccsv && make dist && cp dist/*.whl ../blenderbim/dist/blenderbim/wheels/
|
cd ../ifccsv && make dist && cp dist/*.whl ../blenderbim/build/wheels/
|
||||||
cd ../ifcpatch && make dist && cp dist/*.whl ../blenderbim/dist/blenderbim/wheels/
|
cd ../ifcpatch && make dist && cp dist/*.whl ../blenderbim/build/wheels/
|
||||||
cd ../ifc4d && make dist && cp dist/*.whl ../blenderbim/dist/blenderbim/wheels/
|
cd ../ifc4d && make dist && cp dist/*.whl ../blenderbim/build/wheels/
|
||||||
cd ../ifc5d && make dist && cp dist/*.whl ../blenderbim/dist/blenderbim/wheels/
|
cd ../ifc5d && make dist && cp dist/*.whl ../blenderbim/build/wheels/
|
||||||
cd ../ifccityjson && make dist && cp dist/*.whl ../blenderbim/dist/blenderbim/wheels/
|
cd ../ifccityjson && make dist && cp dist/*.whl ../blenderbim/build/wheels/
|
||||||
cd dist/working && . env/bin/activate && $(PIP) download GitPython --dest=../blenderbim/wheels
|
cd build && . env/bin/activate && $(PIP) download GitPython --dest=./wheels
|
||||||
# Provides audio playback for costing
|
# Provides audio playback for costing
|
||||||
# This is a REALLY IMPORTANT feature
|
# This is a REALLY IMPORTANT feature
|
||||||
cd dist/working && . env/bin/activate && $(PIP) wheel git+https://github.com/Andrej730/aud.git --wheel-dir=../blenderbim/wheels
|
cd build && . env/bin/activate && $(PIP) wheel git+https://github.com/Andrej730/aud.git --wheel-dir=../wheels
|
||||||
# IfcOpenShell dependency - support for new typing features
|
# IfcOpenShell dependency - support for new typing features
|
||||||
cd dist/working && . env/bin/activate && $(PIP) download typing_extensions --dest=../blenderbim/wheels
|
cd build && . env/bin/activate && $(PIP) download typing_extensions --dest=./wheels
|
||||||
# Required by IfcCSV
|
# Required by IfcCSV
|
||||||
cd dist/working && . env/bin/activate && $(PIP) download pandas $(PYPI_PLATFORM) --python-version $(PYPI_VERSION) --implementation $(PYPI_IMP) --only-binary=:all: --dest=../blenderbim/wheels
|
cd build && . env/bin/activate && $(PIP) download pandas $(PYPI_PLATFORM) --python-version $(PYPI_VERSION) --implementation $(PYPI_IMP) --only-binary=:all: --dest=./wheels
|
||||||
# Pandas ships with very heavy tests
|
# Pandas ships with very heavy tests
|
||||||
# cd dist/working/site-packages/pandas && rm -rf tests
|
# cd build/site-packages/pandas && rm -rf tests
|
||||||
cd dist/working && . env/bin/activate && $(PIP) download openpyxl --dest=../blenderbim/wheels
|
cd build && . env/bin/activate && $(PIP) download openpyxl --dest=./wheels
|
||||||
# odfpy doesn't come with its own wheel, so whee'l (get it?) create it ourselves!
|
# odfpy doesn't come with its own wheel, so whee'l (get it?) create it ourselves!
|
||||||
cd dist/working && . env/bin/activate && $(PIP) wheel odfpy --wheel-dir=../blenderbim/wheels
|
cd build && . env/bin/activate && $(PIP) wheel odfpy --wheel-dir=./wheels
|
||||||
# Required by IFCCityJSON
|
# Required by IFCCityJSON
|
||||||
cd dist/working && . env/bin/activate && $(PIP) download cjio --dest=../blenderbim/wheels
|
cd build && . env/bin/activate && $(PIP) download cjio --dest=./wheels
|
||||||
# Provides express rule validation for ifcopenshell.validate
|
# Provides express rule validation for ifcopenshell.validate
|
||||||
cd dist/working && . env/bin/activate && $(PIP) download pytest --dest=../blenderbim/wheels
|
cd build && . env/bin/activate && $(PIP) download pytest --dest=./wheels
|
||||||
# Provides Brickschema functionality
|
# Provides Brickschema functionality
|
||||||
cd dist/working && . env/bin/activate && $(PIP) download "brickschema[persistence]==0.7.6a2" --dest=../blenderbim/wheels
|
cd build && . env/bin/activate && $(PIP) download "brickschema[persistence]==0.7.6a2" --dest=./wheels
|
||||||
# Required for SVG to DXF conversion
|
# Required for SVG to DXF conversion
|
||||||
cd dist/working && . env/bin/activate && $(PIP) download ezdxf --dest=../blenderbim/wheels
|
cd build && . env/bin/activate && $(PIP) download ezdxf --dest=./wheels
|
||||||
# Required by bcf
|
# Required by bcf
|
||||||
cd dist/working && . env/bin/activate && $(PIP) download xsdata --dest=../blenderbim/wheels
|
cd build && . env/bin/activate && $(PIP) download xsdata --dest=./wheels
|
||||||
cd dist/working && . env/bin/activate && $(PIP) download xmlschema --dest=../blenderbim/wheels
|
cd build && . env/bin/activate && $(PIP) download xmlschema --dest=./wheels
|
||||||
cd dist/working && . env/bin/activate && $(PIP) download elementpath --dest=../blenderbim/wheels
|
cd build && . env/bin/activate && $(PIP) download elementpath --dest=./wheels
|
||||||
cd dist/working && . env/bin/activate && $(PIP) download six --dest=../blenderbim/wheels
|
cd build && . env/bin/activate && $(PIP) download six --dest=./wheels
|
||||||
# Required by drawing module
|
# Required by drawing module
|
||||||
cd dist/working && . env/bin/activate && $(PIP) download lxml $(PYPI_PLATFORM) --python-version $(PYPI_VERSION) --implementation $(PYPI_IMP) --only-binary=:all: --dest=../blenderbim/wheels
|
cd build && . env/bin/activate && $(PIP) download lxml $(PYPI_PLATFORM) --python-version $(PYPI_VERSION) --implementation $(PYPI_IMP) --only-binary=:all: --dest=./wheels
|
||||||
# Required by qto and drawing module
|
# Required by qto and drawing module
|
||||||
cd dist/working && . env/bin/activate && $(PIP) download shapely $(PYPI_PLATFORM) --python-version $(PYPI_VERSION) --implementation $(PYPI_IMP) --only-binary=:all: --dest=../blenderbim/wheels
|
cd build && . env/bin/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
|
# Required by the BIM type manager thumbnail generator
|
||||||
cd dist/working && . env/bin/activate && $(PIP) download pillow $(PYPI_PLATFORM) --python-version $(PYPI_VERSION) --implementation $(PYPI_IMP) --only-binary=:all: --dest=../blenderbim/wheels
|
cd build && . env/bin/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
|
# Provides mustache templating in construction docs and web UI data
|
||||||
cd dist/working && . env/bin/activate && $(PIP) download pystache --dest=../blenderbim/wheels
|
cd build && . env/bin/activate && $(PIP) download pystache --dest=./wheels
|
||||||
# Provides SVG export in construction documentation
|
# Provides SVG export in construction documentation
|
||||||
cd dist/working && . env/bin/activate && $(PIP) download svgwrite --dest=../blenderbim/wheels
|
cd build && . env/bin/activate && $(PIP) download svgwrite --dest=./wheels
|
||||||
# Provides fuzzy date parsing for construction sequencing
|
# Provides fuzzy date parsing for construction sequencing
|
||||||
cd dist/working && . env/bin/activate && $(PIP) download python-dateutil --dest=../blenderbim/wheels
|
cd build && . env/bin/activate && $(PIP) download python-dateutil --dest=./wheels
|
||||||
# Provides duration parsing for construction sequencing
|
# Provides duration parsing for construction sequencing
|
||||||
cd dist/working && . env/bin/activate && $(PIP) download isodate --dest=../blenderbim/wheels
|
cd build && . env/bin/activate && $(PIP) download isodate --dest=./wheels
|
||||||
# Provides networkx graph analysis for project dependency calculations
|
# Provides networkx graph analysis for project dependency calculations
|
||||||
cd dist/working && . env/bin/activate && $(PIP) download networkx --dest=../blenderbim/wheels
|
cd build && . env/bin/activate && $(PIP) download networkx --dest=./wheels
|
||||||
# Required by IFCDiff
|
# Required by IFCDiff
|
||||||
cd dist/working && . env/bin/activate && $(PIP) download deepdiff --dest=../blenderbim/wheels
|
cd build && . env/bin/activate && $(PIP) download deepdiff --dest=./wheels
|
||||||
# Required by IFCCSV and ifcopenshell.util.selector
|
# Required by IFCCSV and ifcopenshell.util.selector
|
||||||
cd dist/working && . env/bin/activate && $(PIP) download lark --dest=../blenderbim/wheels
|
cd build && . env/bin/activate && $(PIP) download lark --dest=./wheels
|
||||||
# Required by IFC4D
|
# Required by IFC4D
|
||||||
cd dist/working && . env/bin/activate && $(PIP) download PyP6Xer --dest=../blenderbim/wheels
|
cd build && . env/bin/activate && $(PIP) download PyP6Xer --dest=./wheels
|
||||||
# Required by web module
|
# Required by web module
|
||||||
cd dist/working && . env/bin/activate && $(PIP) download python-socketio[asyncio_client] --dest=../blenderbim/wheels
|
cd build && . env/bin/activate && $(PIP) download python-socketio[asyncio_client] --dest=./wheels
|
||||||
cd dist/working && . env/bin/activate && $(PIP) download aiohttp --dest=../blenderbim/wheels
|
cd build && . env/bin/activate && $(PIP) download aiohttp --dest=./wheels
|
||||||
# Required by light module
|
# Required by light module
|
||||||
cd dist/working && . env/bin/activate && $(PIP) download pytz --dest=../blenderbim/wheels
|
cd build && . env/bin/activate && $(PIP) download pytz --dest=./wheels
|
||||||
cd dist/working && . env/bin/activate && $(PIP) download tzfpy $(PYPI_PLATFORM) --python-version $(PYPI_VERSION) --implementation $(PYPI_IMP) --only-binary=:all: --dest=../blenderbim/wheels
|
cd build && . env/bin/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.
|
# pyradiance is using different platform versions than defaults in our makefile.
|
||||||
ifeq ($(PLATFORM), linux)
|
ifeq ($(PLATFORM), linux)
|
||||||
cd dist/working && . env/bin/activate && $(PIP) download pyradiance --platform manylinux_2_35_x86_64 --python-version $(PYPI_VERSION) --implementation $(PYPI_IMP) --only-binary=:all: --dest=../blenderbim/wheels
|
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
|
||||||
else ifeq ($(PLATFORM), macos)
|
else ifeq ($(PLATFORM), macos)
|
||||||
cd dist/working && . env/bin/activate && $(PIP) download pyradiance --platform macosx_10_13_x86_64 --python-version $(PYPI_VERSION) --implementation $(PYPI_IMP) --only-binary=:all: --dest=../blenderbim/wheels
|
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
|
||||||
else
|
else
|
||||||
cd dist/working && . env/bin/activate && $(PIP) download pyradiance $(PYPI_PLATFORM) --python-version $(PYPI_VERSION) --implementation $(PYPI_IMP) --only-binary=:all: --dest=../blenderbim/wheels
|
cd build && . env/bin/activate && $(PIP) download pyradiance $(PYPI_PLATFORM) --python-version $(PYPI_VERSION) --implementation $(PYPI_IMP) --only-binary=:all: --dest=./wheels
|
||||||
endif
|
endif
|
||||||
rm -rf dist/working
|
|
||||||
|
|
||||||
# Provides jsgantt-improved supports for web-based construction sequencing gantt charts
|
# Provides jsgantt-improved supports for web-based construction sequencing gantt charts
|
||||||
mkdir dist/working
|
cd build/blenderbim/bim/data/gantt/ && wget https://raw.githubusercontent.com/jsGanttImproved/jsgantt-improved/master/dist/jsgantt.js
|
||||||
cd dist/working && wget https://raw.githubusercontent.com/jsGanttImproved/jsgantt-improved/master/dist/jsgantt.js
|
cd build/blenderbim/bim/data/gantt/ && wget https://raw.githubusercontent.com/jsGanttImproved/jsgantt-improved/master/dist/jsgantt.css
|
||||||
cd dist/working && wget https://raw.githubusercontent.com/jsGanttImproved/jsgantt-improved/master/dist/jsgantt.css
|
|
||||||
cp dist/working/jsgantt* dist/blenderbim/bim/data/gantt/
|
|
||||||
rm -rf dist/working
|
|
||||||
|
|
||||||
# Provides IFCJSON functionality
|
# Provides IFCJSON functionality
|
||||||
mkdir dist/working
|
cd build && wget https://github.com/IFCJSON-Team/IFC2JSON_python/archive/master.zip
|
||||||
cd dist/working && wget https://github.com/IFCJSON-Team/IFC2JSON_python/archive/master.zip
|
cd build && unzip master.zip && rm master.zip
|
||||||
cd dist/working && unzip master.zip
|
|
||||||
# IFCJSON doesn't have pyproject.toml, so we use python command.
|
# IFCJSON doesn't have pyproject.toml, so we use python command.
|
||||||
cd dist/working/IFC2JSON_python-master/file_converters && \
|
cd build/IFC2JSON_python-master/file_converters && \
|
||||||
$(PYTHON) -c "from setuptools import setup; \
|
$(PYTHON) -c "from setuptools import setup; \
|
||||||
setup( \
|
setup( \
|
||||||
name='ifcjson', \
|
name='ifcjson', \
|
||||||
@@ -209,72 +203,67 @@ endif
|
|||||||
author_email='jan@brewsky.nl', \
|
author_email='jan@brewsky.nl', \
|
||||||
packages=['ifcjson'], \
|
packages=['ifcjson'], \
|
||||||
)" bdist_wheel
|
)" bdist_wheel
|
||||||
cp -r dist/working/IFC2JSON_python-master/file_converters/dist/*.whl dist/blenderbim/wheels/
|
cp -r build/IFC2JSON_python-master/file_converters/dist/*.whl build/wheels/
|
||||||
rm -rf dist/working
|
|
||||||
|
|
||||||
# Brickschema requires pkg_resources which is provided by Blender.
|
# Brickschema requires pkg_resources which is provided by Blender.
|
||||||
# Provides Brickschema functionality
|
# Provides Brickschema functionality
|
||||||
mkdir dist/working
|
|
||||||
# For now lets bundle the latest nightly schema
|
# For now lets bundle the latest nightly schema
|
||||||
cd dist/working && wget https://github.com/BrickSchema/Brick/releases/download/nightly/Brick.ttl
|
cd build/blenderbim/bim/schema && wget https://github.com/BrickSchema/Brick/releases/download/nightly/Brick.ttl
|
||||||
cd dist/working && cp Brick.ttl ../blenderbim/bim/schema/Brick.ttl
|
|
||||||
rm -rf dist/working
|
|
||||||
|
|
||||||
# Required for hipped roof generation
|
# Required for hipped roof generation
|
||||||
mkdir dist/working
|
cd build && wget https://github.com/prochitecture/bpypolyskel/archive/refs/heads/master.zip
|
||||||
cd dist/working && wget https://github.com/prochitecture/bpypolyskel/archive/refs/heads/master.zip
|
cd build && unzip master.zip && rm master.zip
|
||||||
cd dist/working && unzip master.zip
|
cd build/bpypolyskel-master && \
|
||||||
cd dist/working/bpypolyskel-master && \
|
|
||||||
$(PYTHON) -c "from setuptools import setup; \
|
$(PYTHON) -c "from setuptools import setup; \
|
||||||
setup( \
|
setup( \
|
||||||
name='bpypolyskel', \
|
name='bpypolyskel', \
|
||||||
version='0.0.0', \
|
version='0.0.0', \
|
||||||
packages=['bpypolyskel'], \
|
packages=['bpypolyskel'], \
|
||||||
)" bdist_wheel
|
)" bdist_wheel
|
||||||
cp -r dist/working/bpypolyskel-master/dist/*.whl dist/blenderbim/wheels/
|
cp -r build/bpypolyskel-master/dist/*.whl build/wheels/
|
||||||
rm -rf dist/working
|
|
||||||
|
|
||||||
# Required for Desktop icon and file association
|
# Required for Desktop icon and file association
|
||||||
cp -r blenderbim/libs/desktop dist/blenderbim/libs/
|
cp -r blenderbim/libs/desktop dist/blenderbim/libs/
|
||||||
|
|
||||||
# Generate translations module for BBIM build
|
# Generate translations module for BBIM build
|
||||||
git clone https://github.com/IfcOpenShell/blenderbim-translations.git dist/working
|
git clone https://github.com/IfcOpenShell/blenderbim-translations.git build
|
||||||
$(PYTHON) scripts/bbim_translations.py -i "dist/working" -o "dist/blenderbim"
|
$(PYTHON) scripts/bbim_translations.py -i "build" -o "build/blenderbim"
|
||||||
rm -rf dist/working
|
|
||||||
|
|
||||||
# Remove dependencies also bundled with Blender
|
# Remove dependencies also bundled with Blender
|
||||||
rm -rf dist/blenderbim/wheels/numpy*
|
rm -rf build/wheels/numpy*
|
||||||
|
|
||||||
cp pyproject.toml pyproject.toml.bak
|
cp pyproject.toml build/
|
||||||
ifeq ($(IS_STABLE), TRUE)
|
ifeq ($(IS_STABLE), TRUE)
|
||||||
cd dist/blenderbim && $(SED) "s/0.0.0/$(VERSION)/" blender_manifest.toml
|
$(SED) "s/0.0.0/$(VERSION)/" build/blenderbim/blender_manifest.toml
|
||||||
$(SED) 's/version = "0.0.0"/version = "$(VERSION)"/' pyproject.toml
|
$(SED) 's/version = "0.0.0"/version = "$(VERSION)"/' build/pyproject.toml
|
||||||
else
|
else
|
||||||
cd dist/blenderbim && $(SED) "s/0.0.0/$(VERSION)-alpha$(VERSION_DATE)/" blender_manifest.toml
|
$(SED) "s/0.0.0/$(VERSION)-alpha$(VERSION_DATE)/" build/blenderbim/blender_manifest.toml
|
||||||
cd dist/blenderbim && $(SED) "s/8888888/$(LAST_COMMIT_HASH)/" __init__.py
|
$(SED) "s/8888888/$(LAST_COMMIT_HASH)/" build/blenderbim/__init__.py
|
||||||
$(SED) 's/version = "0.0.0"/version = "$(VERSION)-alpha$(VERSION_DATE)"/' pyproject.toml
|
$(SED) 's/version = "0.0.0"/version = "$(VERSION)-alpha$(VERSION_DATE)"/' build/pyproject.toml
|
||||||
endif
|
endif
|
||||||
|
|
||||||
cd dist/blenderbim && $(SED) "s/os-arch/$(BLENDER_PLATFORM)/" blender_manifest.toml
|
$(SED) "s/os-arch/$(BLENDER_PLATFORM)/" build/blenderbim/blender_manifest.toml
|
||||||
|
|
||||||
# Provides BlenderBIM Add-on functionality
|
# Provides BlenderBIM Add-on functionality
|
||||||
$(SED) 's/version = "0.0.0"/version = "$(VERSION)"/' pyproject.toml
|
$(SED) 's/version = "0.0.0"/version = "$(VERSION)"/' build/pyproject.toml
|
||||||
$(PYTHON) -m build
|
cd build && . env/bin/activate && $(PYTHON) -m build
|
||||||
cp dist/*.whl ./dist/blenderbim/wheels/
|
cp build/dist/*.whl build/wheels/
|
||||||
mv pyproject.toml.bak pyproject.toml
|
mv build/wheels/*.whl build/blenderbim/wheels/
|
||||||
|
|
||||||
$(PYTHON) scripts/get_wheels.py dist/blenderbim/wheels dist/blenderbim/blender_manifest.toml
|
$(PYTHON) scripts/get_wheels.py build/blenderbim/wheels build/blenderbim/blender_manifest.toml
|
||||||
rm -rf dist/blenderbim/bim/
|
rm -rf build/blenderbim/bim/
|
||||||
rm -rf dist/blenderbim/core/
|
rm -rf build/blenderbim/core/
|
||||||
rm -rf dist/blenderbim/tool/
|
rm -rf build/blenderbim/tool/
|
||||||
|
|
||||||
ifeq ($(IS_STABLE), TRUE)
|
ifeq ($(IS_STABLE), TRUE)
|
||||||
cd dist && zip -r blenderbim_$(PYVERSION)-$(VERSION)-$(BLENDER_PLATFORM).zip ./*
|
cd build && zip -r blenderbim_$(PYVERSION)-$(VERSION)-$(BLENDER_PLATFORM).zip ./blenderbim
|
||||||
else
|
else
|
||||||
cd dist && zip -r blenderbim_$(PYVERSION)-$(VERSION)-alpha$(VERSION_DATE)-$(BLENDER_PLATFORM).zip ./*
|
cd build && zip -r blenderbim_$(PYVERSION)-$(VERSION)-alpha$(VERSION_DATE)-$(BLENDER_PLATFORM).zip ./blenderbim
|
||||||
endif
|
endif
|
||||||
|
|
||||||
rm -rf dist/blenderbim
|
mv build/blenderbim*.zip dist/
|
||||||
|
|
||||||
|
rm -rf build
|
||||||
|
|
||||||
.PHONY: test
|
.PHONY: test
|
||||||
test:
|
test:
|
||||||
|
|||||||
Reference in New Issue
Block a user