Closed vmarkovtsev closed 1 year ago
btw I also needed the following:
patchelf --remove-needed libpython3.11.so.1.0 path/to/gopy/built/_library.cpython-*.so
this way auditwheel doesn't cry on missing libpython. Note that this dependency is indeed redundant in case the native extension is imported in an already running Python interpreter.
this is something you do in cibuildwheel config? not something to add here, right? You could potentially add that somewhere in README.md if so.
Well, it depends. Ideally, gopy
wouldn't produce shared libraries linked to libpython*
. Every time we import the wrapper, Python is already running by definition so the missing symbols resolve without having to link against libpython*
. I can dive deeper into how gopy
works and offer a patch.
On the other hand, I am only sure about Linux. macOS or Windows could theoretically have other runtime symbol resolution behavior.
Without this change, cibuildwheel cannot build a correct wheel from the generated project. The problem is that the native lib is added by
MANIFEST.in
andpython3 -m pip wheel
ignores it and thinks that the package is pure Python. Therefore it builds a pure wheel and the packaging pipeline crashes.