summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorRaphaël Barrois <raphael.barrois@polytechnique.org>2015-04-01 01:35:00 +0200
committerRaphaël Barrois <raphael.barrois@polytechnique.org>2015-04-01 01:35:00 +0200
commitb5c22ec0f8560fb630aeb285e352c9e9f9b4de9c (patch)
treea5edde20f79469865ec28cede00f47afeafc79b4 /setup.py
parentae1f6cdd6dc726ed9ea781c48de5f2f452fa8311 (diff)
downloadsemantic-version-b5c22ec0f8560fb630aeb285e352c9e9f9b4de9c.tar.gz
Fix setup.py for readme, bis.
Diffstat (limited to 'setup.py')
-rwxr-xr-xsetup.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/setup.py b/setup.py
index a371255..b8e164a 100755
--- a/setup.py
+++ b/setup.py
@@ -26,10 +26,12 @@ def get_version(package_name):
def clean_readme(fname):
+ """Cleanup README.rst for proper PyPI formatting."""
with codecs.open(fname, 'r', 'utf-8') as f:
return ''.join(
re.sub(r':\w+:`([^`]+?)( <[^<>]+>)?`', r'``\1``', line)
for line in f
+ if not (line.startswith('.. currentmodule') or line.startswith('.. toctree'))
)