On 13/11/17 07:41, Andreas Tille wrote:
Hi,

I'm trying to upgrade python-csb to the new upstream version (in
Git[1]).  If I try to build it I get:


gbp:info: Building with (cowbuilder) for sid
gbp:info: Tarballs 'python-csb_1.2.5+dfsg.orig.tar.gz' not found at 
'../tarballs/'
gbp:info: Creating 
/home/andreas/debian-maintain/alioth/debian-med_git/build-area/python-csb_1.2.5+dfsg.orig.tar.gz
gbp:info: Exporting 'WC' to 
'/home/andreas/debian-maintain/alioth/debian-med_git/build-area/python-csb-tmp'
gbp:info: Moving 
'/home/andreas/debian-maintain/alioth/debian-med_git/build-area/python-csb-tmp' 
to 
'/home/andreas/debian-maintain/alioth/debian-med_git/build-area/python-csb-1.2.5+dfsg'
I: using cowbuilder as pbuilder
dpkg-source: info: applying exclude_online_tests.patch
dpkg-source: info: applying reproducible.patch
dh clean --with python2,python3 --buildsystem=pybuild
    debian/rules override_dh_auto_clean
make[1]: Entering directory 
'/home/andreas/debian-maintain/alioth/debian-med_git/build-area/python-csb-1.2.5+dfsg'
dh_auto_clean
I: pybuild base:184: python2.7 setup.py clean
running clean
removing 
'/home/andreas/debian-maintain/alioth/debian-med_git/build-area/python-csb-1.2.5+dfsg/.pybuild/pythonX.Y_2.7/build'
 (and everything under it)
'build/bdist.linux-x86_64' does not exist -- can't clean it
'build/scripts-2.7' does not exist -- can't clean it
I: pybuild base:184: python3.6 setup.py clean
Traceback (most recent call last):
   File "setup.py", line 8, in <module>
     __doc__ = open('README.rst').read()
   File "/usr/lib/python3.6/encodings/ascii.py", line 26, in decode
     return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 4205: 
ordinal not in range(128)
E: pybuild pybuild:283: clean: plugin distutils failed with: exit code=1: 
python3.6 setup.py clean
dh_auto_clean: pybuild --clean -i python{version} -p 3.6 returned exit code 13
debian/rules:21: recipe for target 'override_dh_auto_clean' failed


Any idea how to fix this?

In the preamble of `setup.py` add:

```
from io import open
```

Then replace subsequent calls to `open` in the file with:

```
open(..., encoding="utf-8")
```

Worth forwarding the patch upstream.

Ghis

Reply via email to