mirror of
https://github.com/jazzband/contextlib2.git
synced 2026-03-16 21:50:24 +00:00
Move version number into a shared file read by both setup.py and docs/conf.py
This commit is contained in:
parent
22bbb22d21
commit
1da5ee6412
3 changed files with 6 additions and 4 deletions
1
VERSION.txt
Normal file
1
VERSION.txt
Normal file
|
|
@ -0,0 +1 @@
|
|||
0.2
|
||||
|
|
@ -16,7 +16,7 @@ import sys, os
|
|||
# If extensions (or modules to document with autodoc) are in another directory,
|
||||
# add these directories to sys.path here. If the directory is relative to the
|
||||
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
||||
#sys.path.insert(0, os.path.abspath('.'))
|
||||
# sys.path.insert(0, os.path.abspath('..'))
|
||||
|
||||
# -- General configuration -----------------------------------------------------
|
||||
|
||||
|
|
@ -48,9 +48,10 @@ copyright = u'2011, Nick Coghlan'
|
|||
# built documents.
|
||||
#
|
||||
# The short X.Y version.
|
||||
version = '0.1'
|
||||
with open('../VERSION.txt') as f:
|
||||
version = f.read().strip()
|
||||
# The full version, including alpha/beta/rc tags.
|
||||
release = '0.1'
|
||||
release = version
|
||||
|
||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||
# for a list of supported languages.
|
||||
|
|
|
|||
2
setup.py
2
setup.py
|
|
@ -3,7 +3,7 @@ from distutils.core import setup
|
|||
|
||||
setup(
|
||||
name='contextlib2',
|
||||
version='0.2',
|
||||
version=open('VERSION.txt').read().strip(),
|
||||
py_modules=['contextlib2'],
|
||||
license='PSF License',
|
||||
description='Backports and enhancements for the contextlib module',
|
||||
|
|
|
|||
Loading…
Reference in a new issue