heitzmann / gdstk

Gdstk (GDSII Tool Kit) is a C++/Python library for creation and manipulation of GDSII and OASIS files.
https://heitzmann.github.io/gdstk/
Boost Software License 1.0
337 stars 84 forks source link

FindQhull.cmake not included in python release #243

Closed KoviRobi closed 5 months ago

KoviRobi commented 5 months ago

Hi

If you grab a python release from https://pypi.org/project/gdstk/#files e.g. https://files.pythonhosted.org/packages/f6/80/faf932598c3aca248d7ba846498e4aefaf8c9883ebebb8977ec8c30443d8/gdstk-0.9.50.tar.gz then it doesn't include FindQhull.cmake

But, it's more complicated than it just not working, as when I added qhull to the dependencies, it found it via a file in path/to/qhull/install/lib/cmake/Qhull/QhullConfig.cmake, which fixed the find_package(Qhull 8 REQUIRED) and set Qhull_DIR, but didn't set QHULL_LIBRARIES so the final .so didn't get linked properly and had

>>> import gdstk
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: /home/rmk35/programming/bspec/tt-support-tools/gdstk.cpython-311-x86_64-linux-gnu.so: undefined symbol: qh_new_qhull

Not sure how to add a file to the python release, but for now I've got a workaround at least.