Skip to content

Python 3.14t build #220

Description

@kdschlosser

I had opened issue CadQuery/cadquery#2029 a bunch of months ago and there wasn't a giant amount of support or help to get cadquery to compile for Python 3.14t. The build system that was in place at the time was causing me a very large amount of grief so I walked away from it for a while. Yesterday I decided to revisit trying to make this happen. I discovered that the build system had been completely rewritten to something that was a whole lot easier to work with.

I want to say TY for rewriting the build system, it has allowed me to make the modifications needed to get a working build for Python 3.14t. If you are interested in seeing what was done to get it to work you can find the code in my fork located HERE. There is value to doing this because it would allow an application to have a thread for handling OCP related tasks and another thread handling UI type stuff and the threads would be able to run parallel to each other. I posted some example code on how to handle making sure that OCP is only accessed from a single thread. I do however want to mention that not everything needs to run using a single thread. I was able to create shapes for every single glyph for for a font for each of the 4 styles using 4 threads at the same time. That process also involved tessellating the shape into a mesh array as well. by using 4 threads there was a 348% speedup which is a substantial increase.

The code should compile for all of the previous Python versions but I have disabled that from happening to speed up the compile times. I also set up a self hosted runner for the windows build because the CI would take about 5.5 hours to complete where as with the self hosted running it takes about 30 minutes. I also added caching of the pybind generated files as well which is something would would need to be removed. I am building against OCCT 8.0.0 that doesn't have VTK. there is no 3.14t build of VTK available and I personally didn't need to have that available. That is the only thing that would need to be dealt with and it might only have to be dealt with in cadquery and not in OCP. I don't know if OCP needs to use the Python c extension of VTK or if it only needs to link against a shared library of VTK not specifically compiled for use with Python.

If you have any questions about the code in that link above ask away. Most of it should be pretty self explanatory.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions