Skip to content

Commit

Permalink
add fallback description in setup.py
Browse files Browse the repository at this point in the history
  • Loading branch information
pirate committed Nov 19, 2016
1 parent 1f4de57 commit d547a68
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 6 deletions.
Binary file modified dist/gzint-0.0.1-py3-none-any.whl
Binary file not shown.
Binary file modified dist/gzint-0.0.1.tar.gz
Binary file not shown.
Binary file added dist/gzint-0.0.2-py2.7.egg
Binary file not shown.
Binary file added dist/gzint-0.0.2-py3-none-any.whl
Binary file not shown.
Binary file added dist/gzint-0.0.2-py3.5.egg
Binary file not shown.
Binary file added dist/gzint-0.0.2.tar.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion gzint.egg-info/PKG-INFO
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: gzint
Version: 0.0.1
Version: 0.0.2
Summary: A library for storing huge integeters efficiently.
Home-page: https://github.com/pirate/gzint
Author: Nick Sweeting
Expand Down
12 changes: 7 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,19 @@
here = path.abspath(path.dirname(__file__))

# parse description from README.md
with open(path.join(here, 'README.md'), encoding='utf-8') as f:
try:
try:
with open(path.join(here, 'README.md'), encoding='utf-8') as f:
readme_header = f.read().split('\n', 2)
short_description = readme_header[0].split(': ')[-1] + '.'
long_description = readme_header[2].split('\n', 2)[2].split('\n\n')[0].replace('\n', ' ').replace('`', '')
except Exception:
raise ValueError('Failed to parse gzint description from README.md')
except Exception:
print('[!] Failed to parse gzint description from README.md')
short_description = 'A library for storing huge integeters efficiently'
long_description = 'This python library helps store massive integers by using a gzipped-string representation in memory.'

setup(
name='gzint',
version='0.0.1',
version='0.0.2',
description=short_description, # parsed from first line of README.md
long_description=long_description, # parsed from first section of README.md

Expand Down

0 comments on commit d547a68

Please sign in to comment.