don't hardcode python2.6 in bindings/python/

Bug #594992 reported by Evgeni Golov on 2010-06-16
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Unity Foundations
Fix Released

Bug Description


while trying to bring libindicate to Debian, I stumbled over the following bug.
In, you check for python >= 2.3.5, so any py2.4, 2.5, 2.6 etc would be fine...
But in bindings/python/ you write:
 _indicate_la_LDFLAGS = -module -avoid-version -export-symbols-regex init_indicate -lpyglib-2.0-python2.6 -lpython2.6

That produces funny results when /usr/bin/python is NOT 2.6.x (like it's on Debian: 2.5.5).
Like: built with py2.5, linked with py2.6, installed to /usr/lib/python2.5...

Intermediate solution: export PYTHON=/usr/bin/python2.6 before building.

Related branches

Ken VanDine: Approve on 2011-09-20
Sebastien Bacher: Pending requested 2011-09-20
Dennis Schridde (devurandom) wrote :

This is even worse, if Python 2.6 is not installed. libindicate will fail to build miserably.

I propose attached patch.

Dennis Schridde (devurandom) wrote :

P.S: To properly fix this, should not only guess the name of pyglib-2.0-python*, but also verify that this library actually exists. (And bail out early if it doesnt, with a useful error message.) In this sense the above patch is incomplete.

Dennis Schridde (devurandom) wrote :

Seems fixed in 0.4.91

Changed in libindicate:
status: New → Fix Released
Dennis Schridde (devurandom) wrote :

In fact it is not. :( Please reopen!

Attached patch improves detection of the Python version and its libraries.
The problem with the current situation in 0.4.91 is that it assumes python-config is named python$VERSION-config, which is not always true. A better solution is thus to let pkg-config figure out everything.

Dennis Schridde (devurandom) wrote :

Repeating my request to reopen from last comment.

The attached patch uses improved quoting and depends on the one attached to bug #643921 (optional-python).

Alex Launi (alexlauni) on 2011-02-07
Changed in libindicate:
status: Fix Released → Triaged
dcelasun (dcelasun) wrote :

This also affects Arch Linux since /usr/bin/python2 (/usr/bin/python is Python 3!) points to python 2.7.x.

Ted Gould (ted) on 2011-09-20
Changed in libindicate:
status: Triaged → Fix Committed
milestone: none → 0.6.0
Ted Gould (ted) on 2011-09-20
Changed in libindicate:
status: Fix Committed → Fix Released
Ted Gould (ted) on 2011-09-20
Changed in unity-foundations:
status: New → Fix Released
milestone: none → oneiric-beta-2
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers