Skip to content

Commit

Permalink
Fix setup
Browse files Browse the repository at this point in the history
  • Loading branch information
artofhuman authored and aleneum committed Sep 4, 2019
1 parent 78fe295 commit bc586de
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,13 @@
exec(f.read())

with codecs.open('README.md', 'r', 'utf-8') as f:
import re
# cut the badges from the description and also the TOC which is currently not working on PyPi
long_description = ''.join(f.readlines()[51:])
assert long_description[:3] == '## ' # Description should start with a headline (## Quickstart)
regex = r"([\s\S]*)## Quickstart"
readme = f.read()

long_description = re.sub(regex, "## Quickstart", readme, 1)
assert long_description[:13] == '## Quickstart' # Description should start with a headline (## Quickstart)

if len(set(('test', 'easy_install')).intersection(sys.argv)) > 0:
import setuptools
Expand Down

0 comments on commit bc586de

Please sign in to comment.