CMake and manylinux Python Wheels

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

CMake and manylinux Python Wheels

Seth G
Hi list,

I'm in the process of updating some SWIG Python bindings for the opensource project MapServer. This uses CMake for the
build process, and my latest version of CMakeLists can be seen at: https://github.com/geographika/mapserver/blob/python-mapscript-build2/mapscript/python/CMakeLists.txt

I'm trying to automate the creation of Python Wheels for Linux, using the manylinux project (https://www.python.org/dev/peps/pep-0571/). In order to create Wheels that work on
many different versions of Linux Python (libpython27.so) can't be linked to the Python extension - Python symbols need to be resolved at run-time. I'm not which compiler flags to add, or how to add them using CMake. From many searches I have found the following links are the closely related:

https://github.com/pybind/pybind11/issues/623
https://github.com/scikit-build/scikit-build/pull/47

However both projects are very complex so I'm unable to find exactly how they resolved it. Any hints on how to achieve this are appreciated.
Please keep in mind both CMake and SWIG are fairly new to me. Any other suggestions/improvements to the CMakeLists file are very welcome.

Regards,

Seth

--
web:http://geographika.co.uk
twitter: @geographika
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake