diff --git a/.github/workflows/build_pyodide.yml b/.github/workflows/build_pyodide.yml index 14bb047333..64fe96c32c 100644 --- a/.github/workflows/build_pyodide.yml +++ b/.github/workflows/build_pyodide.yml @@ -40,7 +40,9 @@ jobs: chmod +x script.sh sed -i s/--tty// pyodide/run_docker pyodide/run_docker ./script.sh - mv dist/ifcopenshell-$VERSION-py3-none-any.whl dist/ifcopenshell-$VERSION+${GITHUB_SHA:0:7}-cp313-cp313-emscripten_4_0_9_wasm32.whl + FILE=`echo dist/ifcopenshell-*.whl` + NEW_FILE=`echo $FILE | sed "s/$VERSION/$VERSION+${GITHUB_SHA:0:7}/"` + mv $FILE $NEW_FILE - name: Configure AWS credentials uses: aws-actions/configure-aws-credentials@v4 diff --git a/pyodide/setup.py b/pyodide/setup.py index e35a5f5340..2a2ab2c577 100644 --- a/pyodide/setup.py +++ b/pyodide/setup.py @@ -1,11 +1,21 @@ -from setuptools import setup, find_packages +from setuptools import setup, Extension, find_packages -setup(name='ifcopenshell', - version='0.8.0', - description='IfcOpenShell is an open source (LGPL) software library for working with the Industry Foundation Classes (IFC) file format.', - author='Thomas Krijnen', - author_email='thomas@aecgeeks.com', - url='http://ifcopenshell.org', - packages=find_packages(), - package_data={'ifcopenshell': ['util/schema/*.json', 'util/schema/*.ifc'], '': ['*.so', '*.json', '*.ifc']}, +setup( + name="ifcopenshell", + version="0.8.0", + description=( + "IfcOpenShell is an open source (LGPL) software library " + "for working with the Industry Foundation Classes (IFC) file format." + ), + author="Thomas Krijnen", + author_email="thomas@aecgeeks.com", + url="https://ifcopenshell.org", + packages=["ifcopenshell"], + package_data={ + # "*.so" is needed to include prebuilt binary extension. Otherwise it would try to build it and fail. + "ifcopenshell": ["util/schema/*.json", "util/schema/*.ifc", "*.so"], + "": ["*.json", "*.ifc"], + }, + # Has to provide extension to get the correct wheel suffix. + ext_modules=[Extension("ifcopenshell._ifcopenshell_wrapper", sources=[])], )