summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--setup.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/setup.py b/setup.py
index 8b5e695..99ebe5a 100644
--- a/setup.py
+++ b/setup.py
@@ -11,8 +11,12 @@ def path_in_dir(relative_path):
return os.path.join(os.path.dirname(__file__), relative_path)
-def read(fname):
- return open(path_in_dir(fname)).read()
+def read_or_empty_string(fname):
+ path = path_in_dir(fname)
+ if os.path.exists(path):
+ return open(path).read()
+ else:
+ return ""
jq_lib_dir = path_in_dir("_jq-lib")
@@ -56,7 +60,7 @@ setup(
name='jq',
version='0.1.0',
description='jq is a lightweight and flexible JSON processor.',
- long_description=read("README"),
+ long_description=read_or_empty_string("README"),
author='Michael Williamson',
url='http://github.com/mwilliamson/jq.py',
license='BSD 2-Clause',