Skip to content

Building and Publishing Wheels

Jeremy Wright edited this page Jan 2, 2024 · 1 revision

Following is a general list of the steps to publish the cadquery-ocp wheels using this repository and its GitHub Actions.

Build and Publish Wheels from this Repository

  • Run the VTK wheel build Action - Make sure that the VTK version has been updated to match what OCP expects within the workflow file, and adjust the Python versions built as-needed. Wait for this build to complete before moving to the next step.
  • Run the Create Python wheel using Conda Action - Make sure to adjust the Python versions built, as well as the OCP, OCCT and VTK versions used in the workflow file. Wait for this build to complete before moving to the next step.
  • Making sure that you are on the main git branch locally, create a tag for the release, i.e. git tag 7.7.2.0. The last dot is used in case package fixes have to happen for this version of OCP.
  • Push the new tag to the repository to trigger the Releases Action i.e. git push origin 7.7.2.0.
  • Ensure that the publish starts and is successful by reviewing the Releases Action page.

Build and Publish Linux aarch64 Wheels Locally

  • The local-build.sh script (contributed by @jeremiahrose ) is provided to build wheels locally for platforms that do not have supported (and/or free) runners on GitHub.
  • Whatever Linux system these are built on will need some form of conda installed (instructions from CadQuery docs).
  • It is also very likely that patchelf will need to be installed. On Debian style systems this can be done with sudo apt install patchelf.
  • Activate the base conda environment.
  • Run local-build.sh within the root of this local repository directory.
  • On some Linux ARM systems where storage size is small (Pinebook Pro), the /tmp directory may run out of space while building these wheels. In this case the wheels have to be build in smaller batches by rotating out the Python versions at the top of the local-build.sh script. After each run the /tmp directory has to be cleared manually or by doing a restart. Do not delete the previous wheels that were built in the dist directory and they will be added to on the next run and can be uploaded later.
  • Create a virtual environment and test one of the wheel files locally using (for example) pip install cadquery-ocp-7.7.2-cp310-manylinux_2_35_aarch64.whl.
  • Upload the locally built wheel using the instructions here. A token is required by PyPI for the upload that of course will not be provided here.

Build and Publish MacOS M1 Wheels Locally

  • The local-build.sh script (contributed by @jeremiahrose ) is provided to build wheels locally for platforms that do not have supported (and/or free) runners on GitHub.
  • Some form of conda needs to be installed (instructions from CadQuery docs).
  • Activate the base conda environment.
  • Run local-build.sh within the root of this local repository directory.
  • Create a virtual environment and test one of the wheel files locally using (for example) pip install cadquery-ocp-7.7.2-cp310-macosx_arm64.whl.
  • Upload the locally built wheel using the instructions here. A token is required by PyPI for the upload that of course will not be provided here.