mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 17:31:45 +00:00
build_pyodide.yaml - move build_pyodide to a separate script
This commit is contained in:
@@ -28,18 +28,8 @@ jobs:
|
||||
VERSION=`cat IfcOpenShell/VERSION`
|
||||
sed -i s/0.8.0/$VERSION/g IfcOpenShell/pyodide/meta.yaml
|
||||
sed -i s/0.8.0/$VERSION/g IfcOpenShell/pyodide/setup.py
|
||||
echo '#!/usr/bin/bash' > script.sh
|
||||
echo 'cd pyodide' >> script.sh
|
||||
echo 'make' >> script.sh
|
||||
echo 'cd ..' >> script.sh
|
||||
echo 'mkdir -p packages/ifcopenshell' >> script.sh
|
||||
echo 'cp IfcOpenShell/pyodide/meta.yaml packages/ifcopenshell' >> script.sh
|
||||
echo 'PYODIDE_ROOT=/src/pyodide \' >> script.sh
|
||||
echo 'PATH=/src/pyodide/emsdk/emsdk:/src/pyodide/emsdk/emsdk/node/22.16.0_64bit/bin:/src/pyodide/emsdk/emsdk/upstream/emscripten:$PATH \' >> script.sh
|
||||
echo 'pyodide build-recipes ifcopenshell --install' >> script.sh
|
||||
chmod +x script.sh
|
||||
sed -i s/--tty// pyodide/run_docker
|
||||
pyodide/run_docker ./script.sh
|
||||
pyodide/run_docker IfcOpenShell/pyodide/build_pyodide.sh
|
||||
FILE=`echo dist/ifcopenshell-*.whl`
|
||||
NEW_FILE=`echo $FILE | sed "s/$VERSION/$VERSION+${GITHUB_SHA:0:7}/"`
|
||||
mv $FILE $NEW_FILE
|
||||
|
||||
Executable
+12
@@ -0,0 +1,12 @@
|
||||
#!/usr/bin/bash
|
||||
set -e
|
||||
cd pyodide
|
||||
make
|
||||
cd ..
|
||||
mkdir -p packages/ifcopenshell
|
||||
cp IfcOpenShell/pyodide/meta.yaml packages/ifcopenshell
|
||||
# Required, otherwise pyodide will create new temp pyodide environment.
|
||||
export PYODIDE_ROOT=/src/pyodide
|
||||
# Ensure emsdk tools are in PATH.
|
||||
export PATH=$PYODIDE_ROOT/emsdk/emsdk:$PYODIDE_ROOT/emsdk/emsdk/node/22.16.0_64bit/bin:$PYODIDE_ROOT/emsdk/emsdk/upstream/emscripten:$PATH
|
||||
pyodide build-recipes ifcopenshell --install
|
||||
@@ -48,6 +48,7 @@ def build() -> None:
|
||||
"-DGLTF_SUPPORT=ON",
|
||||
"-DADD_COMMIT_SHA=ON",
|
||||
"-DVERSION_OVERRIDE=ON",
|
||||
"-DSCHEMA_VERSIONS=4",
|
||||
]
|
||||
)
|
||||
run([str(REPO_WIN / "install-ifcopenshell.bat"), "vs2022-x64", "Release"])
|
||||
|
||||
Reference in New Issue
Block a user