Merge pull request #3855 from ThomasWaldmann/fix-pypi-desc

fix package long description, fixes #3854
This commit is contained in:
TW 2018-05-24 00:56:02 +02:00 committed by GitHub
commit 7af90d015e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -215,10 +215,12 @@ else:
with open('README.rst', 'r') as fd:
long_description = fd.read()
# remove header, but have one \n before first headline
start = long_description.find('What is BorgBackup?')
assert start >= 0
long_description = '\n' + long_description[start:]
# remove badges
long_description = re.compile(r'^\.\. start-badges.*^\.\. end-badges', re.M | re.S).sub('', long_description)
# remove |substitutions|
long_description = re.compile(r'\|screencast\|').sub('', long_description)
# remove unknown directives
long_description = re.compile(r'^\.\. highlight:: \w+$', re.M).sub('', long_description)