@@ -97,40 +97,49 @@ jobs:
97
97
base=$(find $PWD/IfcOpenShell/build -maxdepth 4 -name install)
98
98
mkdir build
99
99
cd build
100
- cmake .. \
101
- "-DCMAKE_BUILD_TYPE=Release" \
102
- "-DENABLE_PYTHON_WRAPPER=On" \
103
- "-DENABLE_TESTS=Off" \
104
- "-DUSE_BUILD_SCRIPT_OUTPUT=Off" \
105
- "-DBoost_USE_STATIC_LIBS=On" \
106
- "-DBoost_NO_BOOST_CMAKE=On" \
107
- "-DCMAKE_INSTALL_PREFIX=../install" \
108
- "-DIFC_INCLUDE_DIR=$base/ifcopenshell/include" \
109
- "-DIFC_LIBRARY_DIR=$base/ifcopenshell/lib" \
110
- "-DOCC_INCLUDE_DIR=$base/occt-7.8.1/include/opencascade" \
111
- "-DOCC_LIBRARY_DIR=$base/occt-7.8.1/lib" \
112
- "-DPython_EXECUTABLE=$base/python-3.9.11/bin/python3" \
113
- "-DBOOST_ROOT=$base/boost-1.86.0" \
114
- "-DGMP_LIBRARY_DIR=$base/gmp-6.2.1/lib" \
115
- "-DMPFR_LIBRARY_DIR=$base/mpfr-3.1.6/lib"
116
- make -j4 install
100
+ for python_root in $base/python-*; do
101
+ cmake .. \
102
+ "-DCMAKE_BUILD_TYPE=Release" \
103
+ "-DENABLE_PYTHON_WRAPPER=On" \
104
+ "-DENABLE_TESTS=Off" \
105
+ "-DUSE_BUILD_SCRIPT_OUTPUT=Off" \
106
+ "-DBoost_USE_STATIC_LIBS=On" \
107
+ "-DBoost_NO_BOOST_CMAKE=On" \
108
+ "-DCMAKE_INSTALL_PREFIX=../install" \
109
+ "-DIFC_INCLUDE_DIR=$base/ifcopenshell/include" \
110
+ "-DIFC_LIBRARY_DIR=$base/ifcopenshell/lib" \
111
+ "-DOCC_INCLUDE_DIR=$base/occt-7.8.1/include/opencascade" \
112
+ "-DOCC_LIBRARY_DIR=$base/occt-7.8.1/lib" \
113
+ "-DPython_EXECUTABLE=$python_root/bin/python3" \
114
+ "-DBOOST_ROOT=$base/boost-1.86.0" \
115
+ "-DGMP_LIBRARY_DIR=$base/gmp-6.2.1/lib" \
116
+ "-DMPFR_LIBRARY_DIR=$base/mpfr-3.1.6/lib"
117
+ make -j4 install
118
+ done
117
119
118
120
- name : Package .zip archives
119
121
run : |
120
122
base=$(find $PWD/IfcOpenShell/build -maxdepth 4 -name install)
121
123
mkdir -p $GITHUB_WORKSPACE/package
122
124
cd $GITHUB_WORKSPACE/package
123
-
124
- cp -R $base/python-3.9.11/lib/python3.9/site-packages/voxec .
125
125
cp $GITHUB_WORKSPACE/pyproject.toml .
126
- echo '[bdist_wheel]' > setup.cfg
127
- echo 'python-tag = cp39' >> setup.cfg
128
-
129
- PATH=$base/python-3.9.11/bin:$PATH python3 -m pip install --upgrade pip setuptools wheel
130
- PATH=$base/python-3.9.11/bin:$PATH python3 -m pip install build delocate
131
- PATH=$base/python-3.9.11/bin:$PATH python3 -m build -w
132
- PATH=$base/python-3.9.11/bin:$PATH delocate-wheel dist/*.whl -w audited
133
- mv audited/voxec-0.4.0-cp39-none-any.whl audited/voxec-0.4.0-cp39-none-macosx_${{ matrix.macosx_ver }}_x86_64.whl
126
+
127
+ for python_root in $base/python-*; do
128
+ PATH=$python_root/bin:$PATH python3 -m pip install --upgrade pip setuptools wheel
129
+ PATH=$python_root/bin:$PATH python3 -m pip install build delocate
130
+
131
+ mm=`$python_root/bin/python3 --version | cut -c8- | cut -d. -f 1,2 | tr -d '.'`
132
+ mdm=`$python_root/bin/python3 --version | cut -c8- | cut -d. -f 1,2`
133
+ cp -R $python_root/lib/python$mdm/site-packages/voxec .
134
+ echo '[bdist_wheel]' > setup.cfg
135
+ echo 'python-tag = cp'$mm >> setup.cfg
136
+
137
+ PATH=$python_root/bin:$PATH python3 -m build -w
138
+ PATH=$python_root/bin:$PATH delocate-wheel dist/*.whl -w audited
139
+ mv audited/voxec-0.4.0-cp$mm-none-any.whl audited/voxec-0.4.0-cp$mm-none-macosx_${{ matrix.macosx_ver }}_${{ matrix.cpuarch }}.whl
140
+
141
+ rm -r voxec dist/*.whl
142
+ done
134
143
135
144
- name : Publish a Python distribution to PyPI
136
145
uses : ortega2247/pypi-upload-action@master
0 commit comments