diff --git a/Makefile b/Makefile index 48d803f..e05970f 100644 --- a/Makefile +++ b/Makefile @@ -59,16 +59,15 @@ jenkins-quality: reports update: pip install -r ci/test-requirements.txt -tag: - @git tag v$(shell python3 setup.py -V) +tagged: + git describe --tags --exact-match + test $$(git ls-files -m | wc -l) = 0 -pypi: tag - @if python3 setup.py -V 2>/dev/null | grep -qs + >/dev/null 2>&1 ; \ - then echo "You need a clean, tagged tree" >&2; exit 1 ; fi +pypi: tagged python3 setup.py sdist upload - ## version depends on tag, so re-tagging doesn't make sense - upload: pypi - git push-all --tags + git push --tags + +.PHONY: all tagged pypi upload test check doc diff --git a/asyncamqp/_version.py b/asyncamqp/_version.py deleted file mode 100644 index 5d269da..0000000 --- a/asyncamqp/_version.py +++ /dev/null @@ -1,2 +0,0 @@ -__version__ = '0.2.13' -__packagename__ = 'asyncamqp' diff --git a/debian/control b/debian/control index 0e7922c..a028fe2 100644 --- a/debian/control +++ b/debian/control @@ -6,6 +6,7 @@ Build-Depends: python3-setuptools, python3-all, debhelper (>= 9), python3 (>> 3.6), python3-anyio, python3-pytest-trio, + python3-setuptools-scm, python3-requests (>> 2.21), python3-pyrabbit, Standards-Version: 3.9.1 diff --git a/setup.py b/setup.py index 9f50de4..98b9479 100644 --- a/setup.py +++ b/setup.py @@ -1,12 +1,10 @@ import setuptools -exec(open("asyncamqp/_version.py", encoding="utf-8").read()) - description = 'AMQP implementation using anyio' setuptools.setup( - name=__packagename__, # noqa: F821 - version=__version__, # noqa: F821 + name="asyncamqp", + use_scm_version={"version_scheme": "guess-next-dev", "local_scheme": "dirty-tag"}, author="Matthias Urlichs", author_email='matthias@urlichs.de', url='https://github.com/python-trio/asyncamqp',