mirror of
https://github.com/jazzband/django-authority.git
synced 2026-03-16 22:20:28 +00:00
Use setuptools_scm.
This commit is contained in:
parent
9a0d4ab678
commit
5d466ac318
3 changed files with 14 additions and 5 deletions
|
|
@ -1,3 +1,11 @@
|
|||
from pkg_resources import get_distribution, DistributionNotFound
|
||||
|
||||
try:
|
||||
__version__ = get_distribution('authority').version
|
||||
except DistributionNotFound:
|
||||
# package is not installed
|
||||
pass
|
||||
|
||||
LOADING = False
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@
|
|||
|
||||
import os
|
||||
import sys
|
||||
from pkg_resources import get_distribution
|
||||
|
||||
# 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
|
||||
|
|
@ -46,11 +47,10 @@ copyright = u'2009, the django-authority team'
|
|||
# |version| and |release|, also used in various other places throughout the
|
||||
# built documents.
|
||||
#
|
||||
# The short X.Y version.
|
||||
version = '0.9'
|
||||
|
||||
# The full version, including alpha/beta/rc tags.
|
||||
release = '0.9dev'
|
||||
release = get_distribution('authority').version
|
||||
# The short X.Y version.
|
||||
version = '.'.join(release.split('.')[:2])
|
||||
|
||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||
# for a list of supported languages.
|
||||
|
|
|
|||
3
setup.py
3
setup.py
|
|
@ -8,7 +8,7 @@ def read(fname):
|
|||
|
||||
setup(
|
||||
name='django-authority',
|
||||
version='0.12',
|
||||
use_scm_version=True,
|
||||
description=(
|
||||
"A Django app that provides generic per-object-permissions "
|
||||
"for Django's auth app."
|
||||
|
|
@ -35,6 +35,7 @@ setup(
|
|||
'Framework :: Django',
|
||||
],
|
||||
install_requires=['django'],
|
||||
setup_requires=['setuptools_scm'],
|
||||
package_data={
|
||||
'authority': [
|
||||
'fixtures/*.json',
|
||||
|
|
|
|||
Loading…
Reference in a new issue