[mapserver-dev] New Python MapScript Build Process

Seth G sethg at geographika.co.uk
Sat Aug 18 01:54:00 PDT 2018

Hi devs,

I have created a new pull request https://github.com/mapserver/mapserver/pull/5645 that implements updates to the Python CMake build process to all for Wheels to be created, and to create a package structure (with all files in a mapscript folder when installed). 

Details from the pull request:

- handling Python2 and Python3
- allow newer CMake SWIG features when available
- use a template setup.py.in file
- builds a Python Wheels as output, rather than simply the mapscript.py and mapscript.pyd files
- adds a new CMake target - cmake --build . --target pythonmapscript-wheel --config Release - this is used to build the Wheels at https://pypi.org/project/mapscript/
- the previous process CMake process builds Python MapScript exactly as before, so should be fully backwards compatible

Along with the above the pull request:

- removes the old setup.py and setup.cfg which were no longer used (even prior to this pull request as CMake was building mapscript)
- updates a couple of the Python MapScript tests
- adds a new ReadMe.rst for Python MapScript, which is also added to the package and uploaded to PyPI

I hope to add updated examples and include the tests in the package in future releases, and to try and get Linux wheels built (although I've run into dependency issues when using the manylinux project on Centos5).

Thoughts/improvements on the above welcome. 



twitter: @geographika

More information about the mapserver-dev mailing list