Hi

Only some more results to this bugreport.

On Fri, Aug 10, 2012 at 04:47:33PM +0200, gregor herrmann wrote:
> On Fri, 10 Aug 2012 15:52:43 +0200, Salvatore Bonaccorso wrote:
> 
> > What I do not yet understand, is why it still uses python2.6 for both
> > packages: at least nautilus-image-manipulator depends on python, which
> > now defaults to 2.7, so some other dependencies brings in python2.6?
> 
> In the chroot when the build fails:
> 
> # aptitude why python2.6
> i   pbuilder-satisfydepends-dummy Depends python-nose
> i A python-nose                   Depends python2.6  
> 
> But then again, it also shouldn't fail if python2.6 is installed by
> accident on the build system.
>  
> > But again, I only did a first look so my initial disclaimer still
> > holds :)
> 
> Same here :)

If I apply to the package the change we discussed[1] now the packages
linaro-image-tools and nautilus-image-manipulator FTBFS in unstable
with:

----cut---------cut---------cut---------cut---------cut---------cut-----
dpkg-buildpackage: source package linaro-image-tools
dpkg-buildpackage: source version 2012.06-1
dpkg-buildpackage: source changed by Fathi Boudra <f...@debian.org>
dpkg-buildpackage: host architecture amd64
 dpkg-source --before-build linaro-image-tools-2012.06
 debian/rules clean
dh clean --with python2
   dh_testdir
   dh_auto_clean
running clean
'build/lib.linux-x86_64-2.6' does not exist -- can't clean it
'build/bdist.linux-x86_64' does not exist -- can't clean it
'build/scripts-2.6' does not exist -- can't clean it
WARNING: the following files are not recognized by DistUtilsExtra.auto:
Traceback (most recent call last):
  File "setup.py", line 21, in <module>
    "linaro-hwpack-replace"],
  File "/usr/lib/python2.6/dist-packages/DistUtilsExtra/auto.py", line 109, in 
setup
    f_loc = f.decode('ascii', errors='ignore')
TypeError: decode() takes no keyword arguments
dh_auto_clean: python2.6 setup.py clean -a returned exit code 1
make: *** [clean] Error 1
dpkg-buildpackage: error: debian/rules clean gave error exit status 2
----cut---------cut---------cut---------cut---------cut---------cut-----

 [1]: See attached patch.

> > Thanks for looking too at it Gregor.
> 
> The perl group makes an expidition into python land? Let's see if
> this is successful :)

:-). 

Regards,
Salvatore
Description: Use sys.version_info[0] instead of sys.version_info.major
 Use sys.version_info[0] instead of sys.version_info.major for backwards
 compatibility to python2.6.
Author: Salvatore Bonaccorso <car...@debian.org>
Bug-Debian: http://bugs.debian.org/682631

--- python-distutils-extra-2.35.orig/DistUtilsExtra/auto.py
+++ python-distutils-extra-2.35/DistUtilsExtra/auto.py
@@ -104,7 +104,7 @@ def setup(**attrs):
         enc = locale.getpreferredencoding()
         for f in sorted(src):
             # ensure that we can always print the file name
-            if(sys.version_info.major < 3):
+            if(sys.version_info[0] < 3):
                 # hack to make this work with Python 2
                 f_loc = f.decode('ascii', errors='ignore')
             else:
@@ -387,7 +387,7 @@ def __add_imports(imports, file, attrs):
         with open(file, 'rb') as f:
             # send binary blob for python2, otherwise sending an unicode object with
             # "encoding" directive makes ast triggering an exception in python2
-            if(sys.version_info.major < 3):
+            if(sys.version_info[0] < 3):
                 file_content = f.read()
             else:
                 file_content = f.read().decode('UTF-8')

Attachment: signature.asc
Description: Digital signature

Reply via email to