diff options
| author | Michael Williamson <mike@zwobble.org> | 2013-08-09 17:29:47 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2013-08-09 17:29:47 +0100 |
| commit | 2ee14d9f003173df36bcb143cfee44f2e759dd2c (patch) | |
| tree | 6dd8d9c8f8955155bf9c07aa4923944128763245 /setup.py | |
| parent | cbfbd9be6b47a5822a3b3cd5ec9f19a82496630e (diff) | |
Set long description to empty string if README not present
Diffstat (limited to 'setup.py')
| -rw-r--r-- | setup.py | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -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', |
