CadQuery / ocp-build-system

A system to build Python wheel PyPI packages for OCP.
Apache License 2.0
8 stars 11 forks source link

Eliminate delvewheel mangling and simplify try_unmangle #26

Closed jdegenstein closed 5 months ago

jdegenstein commented 5 months ago

We have been working on a new package called ocp-addons which is intended to provide separate performance-critical code in C++ and built with pybind11 against OCP libs. We are able to compile wheels and use them on Linux/MacOS without issue. We are able to compile a wheel on Windows and use it with the ocp package from conda-forge, but have had some very confusing issues with the cadquery-ocp. Basically the mangling process from delvewheel seems to introduce something that looks like an ABI/DLL incompatibility. The fix is to simply pass the --no-mangle-all to delvewheel during the repair process and the OCCT libs will be copied like e.g. TKBRep.dll rather than with mangled names. Something about delvewheel is actually modifying the SHA256 sum of the DLLs it mangles.

There is also some redundant/non-working code for in setup.py of the above repo for windows wheel unmangling that is eliminated here.

jmwright commented 5 months ago

@jdegenstein I am re-running the wheel build now and you should be able to test the files manually.

https://github.com/CadQuery/ocp-build-system/actions/runs/8757978524