Skip to content
GitLab
Explore
Sign in
Register
Commits on Source (2)
Add patch to fix setup.py with Python 2.7.
· 3b749dfc
Bas Couwenberg
authored
Nov 05, 2018
3b749dfc
Set distribution to experimental.
· 4985a1ba
Bas Couwenberg
authored
Nov 05, 2018
4985a1ba
Show whitespace changes
Inline
Side-by-side
debian/changelog
View file @
4985a1ba
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 0
7:31:39
+0100
-- Bas Couwenberg <sebastic@debian.org> Mon, 05 Nov 2018 0
8:19:18
+0100
pyshp (1.2.12+ds-2) unstable; urgency=medium
...
...
debian/patches/series
0 → 100644
View file @
4985a1ba
setup-py2.patch
debian/patches/setup-py2.patch
0 → 100644
View file @
4985a1ba
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',