Python 3.14t build

Open
#220 11 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Active
Tech stack
cpp, python

Research direction

Start by reviewing the linked fork’s python3.14t branch and comparing its build changes with OCP’s current build system. Check the Windows runner, pybind-generated-file caching, and the VTK implications of building against OCCT 8.0.0; done means the proposed Python 3.14t build approach is validated and its compatibility scope is documented.

Written by the indexing model from the issue text.

Description

I had opened issue https://github.com/CadQuery/cadquery/issues/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.

Dominant language
C++
Stars
200
Forks
48
Avg merge
1d 13h
Merged PRs (30d)
4

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from CadQuery/OCP

All issues in CadQuery/OCP

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.