diff --git a/README.rst b/README.rst index dce3b99..8fa399b 100644 --- a/README.rst +++ b/README.rst @@ -1,5 +1,5 @@ ======================================================= -PyDotplus - Python interface to Graphviz's Dot language +PyDotPlus - Python interface to Graphviz's Dot language ======================================================= .. image:: https://pypip.in/py_versions/pydotplus/badge.png diff --git a/doc/conf.py b/doc/conf.py index e2a9d2f..77e25b3 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -50,14 +50,31 @@ master_doc = 'index' project = u'PyDotPlus' copyright = u'2014, PyDotPlus Developers' + # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. -# -# The short X.Y version. -version = '' + +def find_version(filename): + import os + import re + + here = os.path.dirname(os.path.abspath(__file__)) + with open(os.path.join(here, filename)) as fd: + version_match = re.search( + r"^__version__ = ['\"]([^'\"]*)['\"]", fd.read(), re.M + ) + if version_match: + return version_match.group(1) + raise RuntimeError('Unable to find version string.') + +pkg_version = find_version('../lib/pydotplus/version.py') + # The full version, including alpha/beta/rc tags. -release = version +release = pkg_version +# The short X.Y version. +version = pkg_version.split('-')[0] + # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/lib/pydotplus/version.py b/lib/pydotplus/version.py index cfd3c23..cdb64a9 100644 --- a/lib/pydotplus/version.py +++ b/lib/pydotplus/version.py @@ -30,6 +30,6 @@ PyDotPlus version module. from __future__ import unicode_literals from __future__ import print_function -__version__ = '2.0.0' +__version__ = '2.0.0-dev' __all__ = ['__version__'] diff --git a/setup.py b/setup.py index 12ec1c4..7de0cca 100644 --- a/setup.py +++ b/setup.py @@ -50,7 +50,7 @@ setup( # Metadata author='PyDotPlus Developers', author_email='carlos@jenkins.co.cr', - description='Python interface to Graphviz\'s Dot Language', + description='Python interface to Graphviz\'s Dot language', long_description=open('README.rst', 'r').read(), url='http://pydotplus.readthedocs.org/',