From 422eb6cbbf7df2c7df6cae899192da8ef25c7de4 Mon Sep 17 00:00:00 2001 From: David Halter Date: Thu, 27 Dec 2012 17:25:25 +0100 Subject: [PATCH] version can now be changed in one file (for sphinx and pypi) --- VERSION | 1 + docs/source/conf.py | 12 +++++++++--- setup.py | 4 +++- 3 files changed, 13 insertions(+), 4 deletions(-) create mode 100644 VERSION diff --git a/VERSION b/VERSION new file mode 100644 index 00000000..d1d899fa --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +0.5.5 diff --git a/docs/source/conf.py b/docs/source/conf.py index 0716eb94..13529c36 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -44,14 +44,20 @@ master_doc = 'index' project = u'Jedi' copyright = u'2012, Jedi contributors' +_path = os.path.dirname(os.path.abspath(__file__)) +with open(_path + '/../../VERSION') as f: + VERSION = f.read().strip() + # 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 = '0.5' + +import re +version = re.match('\d+\.\d+', VERSION).group(0) # The full version, including alpha/beta/rc tags. -release = '0.5b5' +release = VERSION # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. @@ -231,7 +237,7 @@ man_pages = [ # dir menu entry, description, category) texinfo_documents = [ ('index', 'Jedi', u'Jedi Documentation', - u'Jedi contributors', 'Jedi', 'One line description of project.', + u'Jedi contributors', 'Jedi', 'Awesome Python autocompletion library.', 'Miscellaneous'), ] diff --git a/setup.py b/setup.py index 9d6100c0..633b8350 100755 --- a/setup.py +++ b/setup.py @@ -7,9 +7,11 @@ __AUTHOR_EMAIL__ = 'davidhalter88@gmail.com' readme = open('README.rst').read() +with open('VERSION') as f: + VERSION = f.read().strip() setup(name='jedi', - version='0.5b5', + version=VERSION, description='An autocompletion tool for Python that can be used for text editors.', author=__AUTHOR__, author_email=__AUTHOR_EMAIL__,