Closed JeroenHoogers closed 1 year ago
Thank you! I think this should already be addressed in #397 (there is no dependency on libpython3.so). #397 only has the SHARED
-> MODULE
change but this seems to be enough to don't require the libpython3.so on the target machine. Does your PR also eliminate the need to have libpython3.so at build time by searching for only a part of the Python libraries?
Please don't merge the master branch, but rebase instead.
Thank you for the response! Yes this also removes build time requirement for a libpython3.x.so which doesn't exist inside a manylinux image. Since CMake 3.18 Development
is split into 2 parts: Development.Module
which is always needed to create a python extension but doesn't link to libpython and Development.Embed
which embeds the python interpreter by linking to libpython (see: https://cmake.org/cmake/help/latest/module/FindPython.html )
Do you have any thoughts on whether to implement it as it is or to make it as an optional CMake parameter?
Background: I was having trouble using this extension outside of a development context because of the wide range of dependencies needed to build/use it. Unfortunately the docker image was not a viable solution in my specific case. So Instead I tried packing the extension inside a .whl file however, this didn't work out of the box since the extension is explicitly linking to
libpython3.x.so
This change:
libpython3.x.so
dependency from the generated PyNvCodec so file. (no longer required to installpython3.x-dev
on machine)Drawback:
Alternative implementation: