wiki:ProposedPythonMapScriptDistribution

MS RFC 57: Make mapscript easy_installable

Date: 2009/06/29
Author: Mathieu Pasquet
Contact: kiorky at cryptelium.net
Status: Draft
Version: MapServer 5.x / 6.x

Overview

Nowodays, most of the python deployment tools (minitage, buildout, pip, easy_install) rely on setuptools API and workflows to deploy python stuff. The idea is to make MapScript follow the egg dance.

Inventory of existing mechanisms

Today, what we have is a way to build a classical distutils's made distribution. The setup.py has some complicated code inside, i think it can be simplified or delegated in someway. We have mapserver-config (only unix as far as i know) which we can query for flags and information from the targeted mapserver installation.

Questions

Technical Solution

  • Make the mapserver release install the shared/static library stuff by default as we need it to compile the python extension module. Today, we need to additionnaly do 'make install-force' to achieve that.
  • Make the thing independant from the official release at some point. Pythonystas are used to download source distributions, even for bindings, and have all the necessary stuff inside this distribution. This may be a clue to copy the swig files inside the python directory then export it to get the final distribution.
  • Make it indexed on the python cheesechop.
  • Make the setup.py produce an egg.
  • Thus by throwing away the distutils imports and use setuptools to package our egg
  • Then we can get all compilation and linking infos from the 'mapserver-config' script and simplify the setup.py. I think even the build_ext subclass can be avoided.

Files affected

Various files in the MapScript python bindings directory

Backwards compatibility issues

Bug ID

  • #3060: Make MapScripts python bindings produce an egg which is easy_installable

Voting history

Questions/Comments from the review period

Last modified 12 years ago Last modified on Jun 24, 2009, 2:14:00 PM