Use setuptools-scm.

This commit is contained in:
Jannis Leidel 2019-11-24 15:14:12 +01:00
parent 396ea4d471
commit 68d0b41ee5
No known key found for this signature in database
GPG key ID: C795956FB489DCA9
3 changed files with 9 additions and 6 deletions

View file

@ -0,0 +1,3 @@
from pkg_resources import get_distribution
__version__ = get_distribution("django-defender").version

View file

@ -21,9 +21,11 @@ project = "django-defender"
copyright = "2014, Ken Cochrane"
author = "Ken Cochrane"
# The full version, including alpha/beta/rc tags
release = "0.6.2"
# The full version, including alpha/beta/rc tags.
release = get_distribution("django-defender").version
# The short X.Y version.
version = ".".join(release.split(".")[:2])
# -- General configuration ---------------------------------------------------

View file

@ -4,9 +4,6 @@ import os
from setuptools import setup, find_packages
version = "0.6.2"
def get_package_data(package):
"""
Return all files under the root package, that are not in a
@ -26,7 +23,8 @@ def get_package_data(package):
setup(
name="django-defender",
version=version,
use_scm_version=True,
setup_requires=["setuptools_scm"],
description="redis based Django app that locks out users after too "
"many failed login attempts.",
long_description="redis based Django app based on speed, that locks out"