summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenn Knowles <kenn.knowles@gmail.com>2013-05-01 18:00:42 -0400
committerKenn Knowles <kenn.knowles@gmail.com>2013-05-01 18:00:42 -0400
commitc1d5e6aaa55697d468dc692781a4c78d1b8fe243 (patch)
tree9686198324c5534a6bf6713d6bc2c37755e4fb18
parent03e57bfdb50c8cf24474cbb1fa0861c10b80e4f5 (diff)
downloadjsonpath-rw-c1d5e6aaa55697d468dc692781a4c78d1b8fe243.tar.gz
Just survive any errors reading the long description
-rw-r--r--setup.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/setup.py b/setup.py
index be9c4ca..8a7ba14 100644
--- a/setup.py
+++ b/setup.py
@@ -9,8 +9,13 @@ import subprocess
if not os.path.exists('README.txt') and 'sdist' in sys.argv:
subprocess.call(['pandoc', '--to=rst', '--smart', '--output=README.txt', 'README.md'])
-# But use the best README around
-readme = 'README.txt' if os.path.exists('README.txt') else 'README.md'
+# But use the best README around; never fail - there are some Windows locales that seem to die on smartquotes,
+# even with the explicit encoding
+try:
+ readme = 'README.txt' if os.path.exists('README.txt') else 'README.md'
+ long_description = io.open(readme, encoding='utf-8').read()
+except:
+ long_description = 'Could not read README.txt'
setuptools.setup(
name='jsonpath-rw',
@@ -20,7 +25,7 @@ setuptools.setup(
author_email='kenn.knowles@gmail.com',
url='https://github.com/kennknowles/python-jsonpath-rw',
license='Apache 2.0',
- long_description=io.open(readme, encoding='utf-8').read(),
+ long_description=long_description,
packages = ['jsonpath_rw'],
test_suite = 'tests',
install_requires = [ 'ply', 'decorator', 'six' ],