The github action can be found in .github/workflows/build-ocp.yml
The action creates a wheel for Python 3.13 for os in ["ubuntu-22.04", "macos-13", "macos-14", "windows-2019"]
This wheel will work with cadquery_ocp, but other packages that depend on vtk will most probably not work.
NOTE: For final wheels always use the official sources from the OCP repository. This can be achieved by setting the environment variable PYWRAP to false. Only use true if you know what you do!
The github action can be found in .github/workflows/build-ocp.yml
The action creates two different types of delocated wheels for OCP 7.8.1.1:
cadquery_ocp-7.8.1.1which is build against pypi's VTK 9.3.1cadquery_ocp_novtk-7.8.1.1which comes without VTK support
The wheels encapsulate the native OCP module into a folder OCP.
OCP
├── Adaptor2d
│ └── __init__.py
├── Adaptor3d
│ └── __init__.py
...
├── IVtk
│ └── __init__.py
├── IVtkOCC
│ └── __init__.py
├── IVtkTools
│ └── __init__.py
├── IVtkVTK
│ └── __init__.py
...
├── OCP.cpython-311-x86_64-linux-gnu.so
...
with __init__.py e.g. for Adaptor2d looking like
from ..OCP.Adaptor2d import *OCP behaves exactly like the conda version, i.e. you can just ìmport OCP.BRep as usual. However, error traces can involve OCP.OCP.BRep ... prefixing the module with the OCP folder
The wheels are created for
- Windows (Intel)
- MacOS (Intel): running from macOS 11.11 or newer
- MacOS (arm64): running from macOS 11.11 or newer
- Linux (Intel): running Ubuntu 20.04 or newer (GLIBC_2.29 and GLIBCXX_3.4.26)
- The vtk version can be built with pypi's
vtk==9.3.1for Python 3.10 - 3.12. For Python 3.13 the dependency iscadquery_vtk==9.3.1sincevtkis not provided on pypi for Python 3.13 - The novtk version can be built for Python3.10 and newer, up to 3.13.
- The vtk wheels are tested against
build123dand `cadquery`` - The novtk wheels are tested against a patched version of
build123donly (vtk support removed)
- For macOS (Intel),
nlopt2.9 is not on pypi. The test installsnloptfrom conda. - For Windows,
casadiandnloptcreate a segmentation fault on exit (even when OCP and VTK are not installed). The test installsnloptandcasadifrom conda. ocpsvghascadquery_ocpas a dependency and will install parallel to the novtk wheel. The test uninstallscadquery_ocpafter installation ofbuild123d.
The action heavily caches artifacts since some steps can take 0.5 - 1.5 h.
For vtk wheels:
VTK-9.3.1-py<version>-<os>-: The generated VTK SDKOCCT-7.8.1-py-<version>-vtk-<os>-: The compiled OCCT SDK with VTK supportOCP-source-7.8.1.1-vtk-<os>-: The generated OCP source with VTK supportOCP-7.8.1.1-VTK-vtk-py<version>-<os>-: The compiled OCP Python module with VTK support
For novtk wheels:
OCCT-7.8.1-py-<version>-novtk-<os>-: The compiled OCCT SDK without VTK supportOCP-7.8.1.1-VTK-novtk-py<version>-<os>-: The compiled OCP Python module without VTK support
<os> being "ubuntu-22.04", "macos-13", "macos-14", and "windows-2019".
<version> being "3.10", "3.11", "3.12", and "3.13"
To recompile, delete the respective cached elements first.
The github action can be found in .github/workflows/build-ocp-stubs.yml
The action creates one wheel for any Python and OS cadquery_ocp_stubs-7.8.1.1-py3-none-any.whl