Skip to content
Commits on Source (2)
pyshp (2.0.0+ds-1) UNRELEASED; urgency=medium
pyshp (2.0.0+ds-1~exp1) experimental; urgency=medium
* Team upload.
* New upstream release.
* Bump Standards-Version to 4.2.1, no changes.
* Drop autopkgtests to test installability & module import.
* Add lintian override for testsuite-autopkgtest-missing.
* Add patch to fix setup.py with Python 2.7.
-- Bas Couwenberg <sebastic@debian.org> Mon, 05 Nov 2018 07:31:39 +0100
-- Bas Couwenberg <sebastic@debian.org> Mon, 05 Nov 2018 08:19:18 +0100
pyshp (1.2.12+ds-2) unstable; urgency=medium
......
Description: Fix setup.py failure with Python 2.7.
I: pybuild base:184: python3.5 setup.py clean
Traceback (most recent call last):
File "setup.py", line 6, in <module>
long_description=open('README.md').read(),
File "/usr/lib/python3.5/encodings/ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 37236: ordinal not in range(128)
Author: Bas Couwenberg <sebastic@debian.org>
Forwarded: https://github.com/GeospatialPython/pyshp/pull/171
--- a/setup.py
+++ b/setup.py
@@ -1,9 +1,21 @@
+import codecs
+import sys
+
from setuptools import setup
+
+PYTHON3 = sys.version_info[0] == 3
+
+def read_file(file):
+ if PYTHON3:
+ return open(file, encoding='utf-8').read()
+ else:
+ return codecs.open(file, encoding='utf-8').read()
+
setup(name='pyshp',
version='2.0.0',
description='Pure Python read/write support for ESRI Shapefile format',
- long_description=open('README.md').read(),
+ long_description=read_file('README.md'),
author='Joel Lawhead',
author_email='jlawhead@geospatialpython.com',
url='https://github.com/GeospatialPython/pyshp',