new: dev: Added version to Sphinx documentation and other minor changes.
This commit is contained in:
parent
c0219c8be6
commit
cc8f6d51eb
@ -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
|
||||
|
25
doc/conf.py
25
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.
|
||||
|
@ -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__']
|
||||
|
2
setup.py
2
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/',
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user