Merge pull request #400 from nsupdate-info/setuptools-scm

Use setuptools-scm for git based versions
This commit is contained in:
TW 2019-04-03 23:58:14 +02:00 committed by GitHub
commit 53cf7ee6dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 4 deletions

View File

@ -4,6 +4,8 @@ nsupdate - dynamic DNS service
import re
from setuptools_scm import get_version
class Version(tuple): # pragma: no cover
"""
@ -62,4 +64,4 @@ class Version(tuple): # pragma: no cover
return version_str
version = Version(0, 12, 0)
version = get_version()

View File

@ -7,3 +7,4 @@ django-registration-redux
django-extensions
social-auth-app-django
requests
setuptools-scm

View File

@ -24,7 +24,7 @@ upload-dir = docs/_build/html
[tool:pytest]
DJANGO_SETTINGS_MODULE = nsupdate.settings.dev
pep8maxlinelength = 120
norecursedirs = .git
norecursedirs = .git .eggs
pep8ignore =
*.py E124 # closing bracket does not match visual indentation (behaves strange!?)
*.py E125 # continuation line does not distinguish itself from next logical line (difficult to avoid!)

View File

@ -4,14 +4,13 @@ setup for nsupdate package
from setuptools import setup, find_packages
from nsupdate import version
with open('README.rst') as f:
readme_content = f.read()
setup(
name='nsupdate',
version=str(version),
use_scm_version=True,
url='http://github.com/nsupdate-info/nsupdate.info/',
license='BSD',
author='The nsupdate.info Team (see AUTHORS)',
@ -45,6 +44,7 @@ setup(
include_package_data=True,
zip_safe=False,
platforms='any',
setup_requires=['setuptools_scm'],
install_requires=[
'dnspython',
'netaddr',
@ -54,6 +54,7 @@ setup(
'django-extensions',
'social-auth-app-django',
'requests', # for our ddns_client
'setuptools_scm'
],
classifiers=[
'Development Status :: 5 - Production/Stable',