FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Updated Python MapScript Build Process by geographika · Pull Request #5645 · MapServer/MapServer · GitHub

Updated Python MapScript Build Process - #5645

Merged
geographika merged 27 commits into
MapServer:masterfrom
geographika:python-mapscript-build2
Aug 31, 2018
Merged

Updated Python MapScript Build Process#5645
geographika merged 27 commits into
MapServer:masterfrom
geographika:python-mapscript-build2

Conversation

geographika commented Aug 18, 2018
edited
Loading

Copy link
Copy Markdown
Member

This pull request contains the updates to the Python CMakeLists including:

  • 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

See the wiki page at https://github.com/mapserver/mapserver/wiki/Python-MapScript-Updates-2018 for ongoing updates to the Python MapScript bindings

rouault commented Aug 18, 2018

Copy link
Copy Markdown
Contributor

Would it be possible to add in Travis-CI testing of the wheel building target ?

Copy link
Copy Markdown
Member Author

@rouault - yes this is on the todo list. I'll hopefully get a look at it this week and will add to this pull request. Currently none of the Python tests are run on Travis so it will be good to get these added back in.

rouault commented Aug 18, 2018

Copy link
Copy Markdown
Contributor

What does the wheel exactly contain ? The mapscript.py and the corresponding .dll/.so right ? Not libmapserver.so/dll, and all its dependencies ? This could probably be clarified in the "Wheels and PyPI" section of mapscript/python/README.rst so people have a clear understanding that they also need to install the native mapserver binaries alongside the wheel (I'm saying that since for example some rasterio wheels provide the full GDAL stack with them)

geographika force-pushed the python-mapscript-build2 branch from b035ba8 to b17ad61 Compare August 21, 2018 12:38

Copy link
Copy Markdown
Member Author

@rouault - I've made a few changes that hopefully address these. The wheel only contains the mapscript.py and .so, plus the examples folder (which is very outdated but I hope to sort out for a next release). They are all in a separate folder now which helps keep Python environments cleaner, and can be easily pip uninstalled.

  • the wheel is now built, installed, and the Python test suite run on Travis (and Appveyor). Unfortunately there is no stdout output written to the logs. This may be hidden by Travis? Also I was not sure where to best place the wheel command. I added a new target in the Makefile and call this separately in .travis.yml
  • I have updated the README to make it clearer the binaries need installing.

Copy link
Copy Markdown
Member Author

If there are no further comments I'll go ahead and merge this later today, to then focus on updating the Python MapScript examples distributed in the Wheel package.

geographika merged commit 04f8fc0 into MapServer:master Aug 31, 2018
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL