[Ubuntu] MapServer Python MapScript and Wheels/Ubuntu Packages
Sebastiaan Couwenberg
sebastic at xs4all.nl
Fri Sep 21 23:38:43 PDT 2018
On 9/22/18 12:29 AM, Seth G wrote:
> Thanks again for the reply. I guess the Python GDAL bindings are the closest to MapServer, the package at https://launchpad.net/~ubuntugis/+archive/ubuntu/ppa includes "usr\lib\python3\dist-packages\osgeo\_gdal.cpython-35m-x86_64-linux-gnu.so", so I guess is for Python 3.5 only? Is it possible to just support Python 3.6 (for example), and ignore other versions?
The GDAL Python bindings are built for all supported Python versions in
Debian using `pyversions -v -r` & `py3versions -v -r`. The output of
those two commands determine with which Python versions the build is
run. There should only a be a single supported Python 3 version in the
distribution, unless there is a migration to a new Python 3.x which you
shouldn't see in Ubuntu LTS.
The packages encode which version of Python they require in the file
path if they are not pure Python which support all versions. So yes, if
you see usr/lib/python3.5 or .cpython-35 in a path that means that
Python 3.5 is required for that file.
> Shapely also has a couple of binaries e.g. _speedups.cpython-36m-x86_64-linux-gnu.so (plus the GOES library it wraps around) but I think shapely is designed so these can be ignored if the binaries don't match the Python version.
The Python packaging policy recommends building the package for all
supported Python versions, as this eases transitions. At least the
default Python version will be used for the build when not supporting
more than one version, so you should never have the situation where a
Python module package does support the Python interpreter version in the
distribution.
This all goes out the window when you get binaries from PyPI instead of
relying on the distribution packages.
> I'll be concentrating in the next few months on cleaning up Mapscript examples, getting test suites running on Python3 etc. so may repost here once this work is complete, and there may be more of a demand for a python3-mapscript.
I will not be patching the mapserver package to include those changes,
so you should encourage your peers in the MapServer project to release
7.2.1 or 7.4 soon to make your changes more widely available.
> Ideally the aim would be to get a Python3 mapscript installation on OSGeoLive along with a Jupyter notebook of examples, so any suggestions on how best to achieve this are welcome (even if it is to continue with Python 2.7).
Is there sufficient space on the OSGeoLive images to have both
python-mapscript & python3-mapscript along with their dependencies
installed?
Do all reverse dependencies of python-mapscript also support Python 3 so
the Python 2 package could be dropped?
There are issue you need to think about in the context of OSGeoLive,
which differs from an installed system with the UbuntuGIS repositories.
Kind Regards,
Bas
More information about the Ubuntu
mailing list