Need an override on install target with "dh --with python2"

Bug #687419 reported by Didier Roche-Tolomelli
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
compizconfig-python (Ubuntu)
Fix Released
Medium
Barry Warsaw

Bug Description

As you can see here: http://bazaar.launchpad.net/~compiz/compizconfig-python/ubuntu/annotate/head:/debian/rules

I need an override on dh_auto_build and dh_auto_install to make that package build. If I don't use it, I get:
dh binary --with python2
   dh_testroot
   dh_prep
 rm -f debian/python-compizconfig.substvars
 rm -f debian/python-compizconfig.*.debhelper
 rm -rf debian/python-compizconfig/
   dh_installdirs
 install -d debian/python-compizconfig
   dh_auto_install
 make -j1 install DESTDIR=/home/didrocks/work/compiz/compiz-config-python/build-area/compizconfig-python-0.9.2.1/debian/python-compizconfig
make[1]: entrant dans le répertoire « /home/didrocks/work/compiz/compiz-config-python/build-area/compizconfig-python-0.9.2.1 »
{'os2_home': {'purelib': '$usersite', 'headers': '$userbase/include/python$py_version_short/$dist_name', 'scripts': '$userbase/bin', 'data': '$userbase', 'platlib': '$usersite'}, 'nt_user': {'purelib': '$usersite', 'headers': '$userbase/Python$py_version_nodot/Include/$dist_name', 'scripts': '$userbase/Scripts', 'data': '$userbase', 'platlib': '$usersite'}, 'os2': {'purelib': '$base/Lib/site-packages', 'headers': '$base/Include/$dist_name', 'scripts': '$base/Scripts', 'data': '$base', 'platlib': '$base/Lib/site-packages'}, 'deb_system': {'purelib': '$base/lib/python$py_version_short/dist-packages', 'headers': '$base/include/python$py_version_short/$dist_name', 'scripts': '$base/bin', 'data': '$base', 'platlib': '$platbase/lib/python$py_version_short/dist-packages'}, 'mac': {'purelib': '$base/Lib/site-packages', 'headers': '$base/Include/$dist_name', 'scripts': '$base/Scripts', 'data': '$base', 'platlib': '$base/Lib/site-packages'}, 'unix_prefix': {'purelib': '$base/lib/python$py_version_short/site-packages', 'headers': '$base/include/python$py_version_short/$dist_name', 'scripts': '$base/bin', 'data': '$base', 'platlib': '$platbase/lib/python$py_version_short/site-packages'}, 'mac_user': {'purelib': '$usersite', 'headers': '$userbase/$py_version_short/include/$dist_name', 'scripts': '$userbase/bin', 'data': '$userbase', 'platlib': '$usersite'}, 'unix_local': {'purelib': '$base/local/lib/python$py_version_short/dist-packages', 'headers': '$base/local/include/python$py_version_short/$dist_name', 'scripts': '$base/local/bin', 'data': '$base/local', 'platlib': '$platbase/local/lib/python$py_version_short/dist-packages'}, 'nt': {'purelib': '$base/Lib/site-packages', 'headers': '$base/Include/$dist_name', 'scripts': '$base/Scripts', 'data': '$base', 'platlib': '$base/Lib/site-packages'}, 'unix_home': {'purelib': '$base/lib/python', 'headers': '$base/include/python/$dist_name', 'scripts': '$base/bin', 'data': '$base', 'platlib': '$base/lib/python'}, 'unix_user': {'purelib': '$usersite', 'headers': '$userbase/include/python$py_version_short/$dist_name', 'scripts': '$userbase/bin', 'data': '$userbase', 'platlib': '$usersite'}}
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
   or: setup.py --help [cmd1 cmd2 ...]
   or: setup.py --help-commands
   or: setup.py cmd --help

error: option --prefix not recognized
make[1]: *** [all] Erreur 1
make[1]: quittant le répertoire « /home/didrocks/work/compiz/compiz-config-python/build-area/compizconfig-python-0.9.2.1 »
dh_auto_install: make -j1 install DESTDIR=/home/didrocks/work/compiz/compiz-config-python/build-area/compizconfig-python-0.9.2.1/debian/python-compizconfig returned exit code 2
make: *** [binary] Erreur 29
dpkg-buildpackage: erreur: fakeroot debian/rules binary a produit une erreur de sortie de type 2
debuild: fatal error at line 1335:
dpkg-buildpackage -rfakeroot -D -us -uc -i -I failed
bzr: ERROR: The build failed.

Tags: python27

Related branches

tags: added: python27
Revision history for this message
Barry Warsaw (barry) wrote :

On a local chroot:

Log for successful build of compizconfig-python_0.9.2.1-0ubuntu1 on amd64 (dist=natty)

Is this bug report still valid?

Changed in compizconfig-python (Ubuntu):
status: New → Incomplete
Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

What is your debian/rules? Did you try removing the override I added?

Revision history for this message
Barry Warsaw (barry) wrote :

More info:

It's true that 'python setup.py build' does not accept the --prefix argument, so the 'all:' rule in the top level Makefile is bogus. But actually, the entire Makefile is unnecessary. dh_python2 should just Do The Right Thing with the existing setup.py. See the attached branch, which successfully builds for me, but is probably not entire right. It removes the top level Makefile, but in order to do that, I had to pass --source-option=--include-removal to the dpkg-buildpackage call. However, in order to do *that* I had to change the source format to 3.0 (quilt). (source format 1 does not accept that option.)

My recommendation would be to remove the top level Makefile entirely and just let dh_python2 do its thing. This will also let you simplify debian/rules. See the linked branch for reference, or let me know and I'll put together a for-real branch for review.

Changed in compizconfig-python (Ubuntu):
status: Incomplete → Confirmed
importance: Undecided → Medium
milestone: none → natty-alpha-2
Revision history for this message
Barry Warsaw (barry) wrote :

Oh, if you want me to put together the branch, please assign the bug to me.

Revision history for this message
Barry Warsaw (barry) wrote :

Never mind the above. With Colin's help I have a fix. Will push a branch and submit a merge proposal momentarily.

Changed in compizconfig-python (Ubuntu):
status: Confirmed → In Progress
assignee: nobody → Barry Warsaw (barry)
Changed in compizconfig-python (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package compizconfig-python - 0.9.2.1-0ubuntu2

---------------
compizconfig-python (0.9.2.1-0ubuntu2) natty; urgency=low

  * debian/rules: Simplify, and force the buildsystem to
    python_distutils so that the Makefile is ignored. It isn't
    correct because 'python setup.py build' does not accept the
    --prefix option, and it isn't needed anyway because dh_python2
    does the right thing. (LP: #687419)
 -- Barry Warsaw <email address hidden> Thu, 13 Jan 2011 00:19:16 -0500

Changed in compizconfig-python (Ubuntu):
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.