SWIG and Python: Create a package compatible with any 3.x version
SWIG generates two wrapping layers for Python module: the C wrapper code and Python wrapper code. And, as I understand, both are agnostic to the specific subversion of Python 3.x (3.1-3.6
However, when compiling the code, I have to include the headers of specific 3.x version of Python, which includes the specific library version inPyConfig.h,
comment(lib,"python34.lib")- which results
in the Python package that has to find and loadpython34.dllin
the runtime, and the loading will fail with any other version.
But all 3.x versions are compatible and simple editing of the produced.pydbinary
- replacing thepython34.dllwith
the final module to work with Python 3.6 just fine.
Is there any way to create a Python 3.x package with SWIG that would be able to search and find any available 3.x version installed on the system?