Fix README (Closes #19).

Also fixes README rendering on PyPI, hopefully.
This commit is contained in:
Raphaël Barrois
2015-04-01 01:16:30 +02:00
parent 54da2367df
commit 5525528da2
2 changed files with 10 additions and 6 deletions

View File

@@ -1,8 +1,3 @@
.. python-semanticversion documentation master file, created by
sphinx-quickstart on Wed May 16 10:41:34 2012.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
python-semanticversion
======================
@@ -27,7 +22,7 @@ Links
Getting started
===============
Intall the package from `PyPI`_, using pip:
Install the package from `PyPI`_, using pip:
.. code-block:: sh

View File

@@ -25,6 +25,14 @@ def get_version(package_name):
return '0.1.0'
def clean_readme(fname):
with codecs.open(fname, 'r', 'utf-8') as f:
return '\n'.join(
re.sub(r':\w+:`([^`]+?)( <[^<>]+>)?`', r'``\1``', line)
for line in f
)
PACKAGE = 'semantic_version'
@@ -34,6 +42,7 @@ setup(
author="Raphaël Barrois",
author_email="raphael.barrois+semver@polytechnique.org",
description="A library implementing the 'SemVer' scheme.",
long_description=clean_readme('README.rst'),
license='BSD',
keywords=['semantic version', 'versioning', 'version'],
url='https://github.com/rbarrois/python-semanticversion',