Skip to content

Commit

Permalink
Use single version reference from main module.
Browse files Browse the repository at this point in the history
  • Loading branch information
carltongibson committed Sep 26, 2020
1 parent 451d372 commit b1f56ed
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
6 changes: 4 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@

import sys, os

from django_filters import __version__

# 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.
Expand Down Expand Up @@ -48,9 +50,9 @@
# built documents.
#
# The short X.Y version.
version = '2.3'
version = __version__
# The full version, including alpha/beta/rc tags.
release = '2.3.0'
release = __version__

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
8 changes: 4 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
import sys
from setuptools import setup, find_packages

from django_filters import __version__

f = open('README.rst')
readme = f.read()
f.close()

version = '2.3.0'

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

setup(
name='django-filter',
version=version,
version=__version__,
description=('Django-filter is a reusable Django application for allowing'
' users to filter querysets dynamically.'),
long_description=readme,
Expand Down

0 comments on commit b1f56ed

Please sign in to comment.