mapnik-python does not build against default python

Bug #354205 reported by springmeyer
10
Affects Status Importance Assigned to Milestone
mapnik (Ubuntu)
Fix Released
Medium
Unassigned
Jaunty
Fix Released
Medium
Unassigned

Bug Description

I was simulating the upgrade from the packaged mapnik 0.5.1 (0.5.1-3ubuntu2) to the newly released mapnik 0.6.0 on Jauny (9.04 development branch) and noticed that python26 is the default Python on jauny while the mapnik package gets installed in the 'site-packages' folder of python2.5

Or at least this is what happened with the steps I followed which were:

$ sudo apt-get build-deps python-mapnik
$ sudo apt-get install python-mapnik
$ python
>>> import mapnik
# error not found

While the package likely should have been installed in '/usr/lib/python2.6/dist-packages' it was rather installed in '/usr/lib/python2.5/site-packages'

I put the python2.5 spot on the PYTHONPATH then it worked.

Then I commenced installing mapnik 0.6.0 which went into '/usr/lib/python2.6/dist-packages' and ran great.

Revision history for this message
springmeyer (springmeyer) wrote :

Whoops, just realized this may have been fixed yesterday (perhaps moments before I tested)

Also it should clarify that I don't know what version of Python the package build against, all I mean to indicate is that the location of installation was wrong. It would be interesting if it did actually compile against the python25 headers (and boost compiled against 2.5 headers) since it still seemed to work when I simply put it on my PYTHONPATH.

Revision history for this message
Luca Falavigna (dktrkranz) wrote :

Thanks for reporting this. I forgot to bump XS-Python-Version to be >= 2.5, so it compiled only for python2.5 and not for 2.6, which is default in Jaunty. Rebuilding with the change suggested fixes it, I'm not sure about Python 2.6 compatibility, though, maybe you can shed a light about that.

Changed in mapnik (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
Changed in mapnik (Ubuntu Jaunty):
importance: Undecided → Medium
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mapnik - 0.5.1-3ubuntu3

---------------
mapnik (0.5.1-3ubuntu3) karmic; urgency=low

  * Finish of the python 2.6 transition (LP: #354205)
    - debian/control
      + Change bdeps from python2.5-dev to python-all-dev (>= 2.5)
      + Change XS-Python-Version from 2.5 to >= 2.5
    - debian/rules:
      + Various changes to enable python2.5 and python2.6 builds

 -- Christophe Sauthier <email address hidden> Fri, 01 May 2009 17:45:42 +0200

Changed in mapnik (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Thomas Ohms (tohms) wrote :

Couldn't we just backport this to Jaunty?

Revision history for this message
springmeyer (springmeyer) wrote :

I have the same question as Thomas. I see the karmic tag in the fix applied. Why not make it available to Jaunty since that is where the problem is?

Also, we've released Mapnik 0.6.0 which **ideally** should be the package available in Karmic, if not Mapnik 0.6.1 (due out in several weeks).

Thoughts?

I'm new to learning about this packaging and would benefit from a sense of who things work.

Also, would it be possible in Karmic to provide two python-mapnik packages? One built against python2.5/boost_python-mt-py25.so and one against python2.6/boost-python-mt-py26?

This would be really really useful for integrating Mapnik with QuantumGIS, which depends on Python2.5

Thoughts on that?

Revision history for this message
Christophe Sauthier (christophe.sauthier) wrote :

Dear Thomas and springmeyer, here is I am planning to fix this bug (I am the one who have uploaded the fix to karmic).

Currently the fix is not really in karmic. Let me explain : I have provided a bug fix package for the mapnik software. BUT it cannot build in karmic for the moment because of a preprocessor problem in karmic (related to libboost and the gcc4.4 transition). So I have to review a fix for that, and only after I will be able to make the build fix for this bug in karmic.

Once it is done in karmic, I will start a SRU procedure (Stable Release Procedure) in order to have it included in jaunty, since it is the compulsory workflow...

I hope to have been able to start in the next few days...

And once all that is done, I will put the 0.6 or 0.6.1 in karmic...

Regarding your question about the 2 packages, I will do my best... but springmeyer count on me to come talk to you with that on IRC... (yeah I went frofrom time to time on #mapnik)

Revision history for this message
Martin Pitt (pitti) wrote :

This is of course fine for an SRU. The package doesn't work at all, and it's a regression from Intrepid.

Revision history for this message
springmeyer (springmeyer) wrote :

Hello Andres and Christopher,

Great to see movement on this. Two thoughs:

1) Andres I took a quick look at your diff, and noticed that you are passing in the python version both in the configure step and the compile/install/clean step, which is unneeded. If you configure with

scons configure $(SCONS_FLAGS) PYTHON=/usr/bin/python$*

you can drop all command line flags in the compile/install/clean steps otherwise it will prompt the Mapnik scons scripts to re-configure (which may not be the intention) every time a flag is picked up.

2) When is the latest time we (upstream) can release 0.6.1 to have a chance for it to be included in Karmic? And what can I/we do to help with the boost compile problem on Karmic?

Cheers,

Dane Springmeyer

Revision history for this message
Christophe Sauthier (christophe.sauthier) wrote :

The bug is that the python2.6 transition has not been addressed completly. Thus the python bindings won't work on jaunty so far.
The various things done to fix it were :
  - Change bdeps from python2.5-dev to python-all-dev (>= 2.5)
  - Change XS-Python-Version from 2.5 to >= 2.5
  - Various changes to enable python2.5 and python2.6 builds, in particular addition of multiple python builds

TEST CASE :
$ sudo apt-get install python-mapnik
$ python
>>> import mapnik
If it fails, the bug is not fixed. If it returns the prompt, it is fixed.

There is no regression risk since only the python bindings are affected by the modifications in the rules file, and that these binding are not working so far.

Changelog :

mapnik (0.5.1-3ubuntu2.1) jaunty-proposed; urgency=low

  * Finish of the python 2.6 transition (LP: #354205)
    - debian/control
      + Change bdeps from python2.5-dev to python-all-dev (>= 2.5)
      + Change XS-Python-Version from 2.5 to >= 2.5
    - debian/rules:
      + Various changes to enable python2.5 and python2.6 builds

 -- Christophe Sauthier <email address hidden> Fri, 01 May 2009 17:45:42 +0200

Revision history for this message
Devid Antonio Filoni (d.filoni) wrote :

motu-sru ACK.

Changed in mapnik (Ubuntu Jaunty):
status: New → Confirmed
Revision history for this message
Martin Pitt (pitti) wrote :

Accepted mapnik into jaunty-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in mapnik (Ubuntu Jaunty):
status: Confirmed → Fix Committed
tags: added: verification-needed
Revision history for this message
springmeyer (springmeyer) wrote :

Great,
Just had a chance to test. I removed my manual install of the Mapnik python bindings, purged and re-installed 'python-mapnik' package, ensured both python2.5 and python2.6 were installed, and then was able to successfully do:

>>> import mapnik

when running the python interpreter both with the default python26 and after jumping into a python2.5 interpreter by typing:

$/usr/bin/python2.5

Thanks so much for this fix!

The only odd thing is that both the python2.6 and python2.6 Mapnik shared object '_mapnik.so' files appear to be linked against libboost_python*py25*.so. I would assume this would cause problems (based on my experience from Mac OSX and boost libs). $ldd against the boost_python libs show they do not explicitly link against any version of python. Can someone with an understanding of library linking on linux explain why this works?

Anyway, I'm glad it does work - thanks for everyone's effort!

- Dane

Martin Pitt (pitti)
tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package mapnik - 0.5.1-3ubuntu2.1

---------------
mapnik (0.5.1-3ubuntu2.1) jaunty-proposed; urgency=low

  * Finish of the python 2.6 transition (LP: #354205)
    - debian/control
      + Change bdeps from python2.5-dev to python-all-dev (>= 2.5)
      + Change XS-Python-Version from 2.5 to >= 2.5
    - debian/rules:
      + Various changes to enable python2.5 and python2.6 builds

 -- Christophe Sauthier <email address hidden> Fri, 01 May 2009 17:45:42 +0200

Changed in mapnik (Ubuntu Jaunty):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.