Skip to content

Commit b1f56ed

Browse files
committed
Use single version reference from main module.
1 parent 451d372 commit b1f56ed

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

docs/conf.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313

1414
import sys, os
1515

16+
from django_filters import __version__
17+
1618
# If extensions (or modules to document with autodoc) are in another directory,
1719
# add these directories to sys.path here. If the directory is relative to the
1820
# documentation root, use os.path.abspath to make it absolute, like shown here.
@@ -48,9 +50,9 @@
4850
# built documents.
4951
#
5052
# The short X.Y version.
51-
version = '2.3'
53+
version = __version__
5254
# The full version, including alpha/beta/rc tags.
53-
release = '2.3.0'
55+
release = __version__
5456

5557
# The language for content autogenerated by Sphinx. Refer to documentation
5658
# for a list of supported languages.

setup.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
import sys
33
from setuptools import setup, find_packages
44

5+
from django_filters import __version__
6+
57
f = open('README.rst')
68
readme = f.read()
79
f.close()
810

9-
version = '2.3.0'
10-
1111
if sys.argv[-1] == 'publish':
1212
if os.system("pip freeze | grep wheel"):
1313
print("wheel not installed.\nUse `pip install wheel`.\nExiting.")
@@ -18,13 +18,13 @@
1818
os.system("python setup.py sdist bdist_wheel")
1919
os.system("twine upload dist/*")
2020
print("You probably want to also tag the version now:")
21-
print(" git tag -a %s -m 'version %s'" % (version, version))
21+
print(" git tag -a %s -m 'version %s'" % (__version__, __version__))
2222
print(" git push --tags")
2323
sys.exit()
2424

2525
setup(
2626
name='django-filter',
27-
version=version,
27+
version=__version__,
2828
description=('Django-filter is a reusable Django application for allowing'
2929
' users to filter querysets dynamically.'),
3030
long_description=readme,

0 commit comments

Comments
 (0)