dh_auto_clean tries to use python instead of python3 when --with python3 specified

Bug #1017043 reported by Umang Varma
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
debhelper (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

I'm running debhelper 9.20120115ubuntu3

Here's an snippet from debuild output:

 fakeroot debian/rules clean
dh clean --with python3
   dh_testdir
   dh_auto_clean
  File "setup.py", line 3
SyntaxError: Non-ASCII character '\xc2' in file setup.py on line 3, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details

Now, in Python3, UTF-8 is the default encoding. So it looks to me that it uses python2 instead of python3.

Umang Varma (umang)
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in debhelper (Ubuntu):
status: New → Confirmed
Revision history for this message
Bernmeister (thebernmeister) wrote :

I managed to get my package built from reading http://www.wefearchange.org/2012/01/debian-package-for-python-2-and-3.html. Specifically , I had to add a section to the debian/rules file:

#!/usr/bin/make -f

%:
 dh $@ --with python3

override_dh_auto_clean:
 set -ex; for python in $(shell py3versions -r); do \
  $$python setup.py clean -a; \
 done;

I'm attempting a PPA upload now of this package, so whilst the package built locally, I don't know if it actually works...but at least I don't get the error any more!

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

There is currently no python3 support in dh_auto_* build machinery. You need to do everything manually with python3. It is a known feature request.

Changed in debhelper (Ubuntu):
status: Confirmed → Invalid
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.