diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 3162634..56c37bc 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -31,9 +31,9 @@ jobs: run: | set -xeu python -VV - pip install setuptools wheel + pip install build - name: Build the wheel - run: python setup.py sdist bdist_wheel + run: python -m build --sdist --wheel - name: Publish to PyPI uses: pypa/gh-action-pypi-publish@master with: diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..840ae20 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,5 @@ +[build-system] +requires = ["setuptools >= 40.6.0", "wheel", "setuptools-scm[toml]>=3.4"] +build-backend = "setuptools.build_meta" + +[tool.setuptools_scm] diff --git a/setup.cfg b/setup.cfg index 576236d..37b15e0 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,7 +1,6 @@ [metadata] name = vault-cli description = CLI tool for hashicorp vault -version = 1.5.0.dev0 author = PeopleDoc author_email = joachim.jablon@people-doc.com url = https://github.com/peopledoc/vault-cli @@ -43,6 +42,7 @@ dev = twine black isort + build test = pytest diff --git a/tests/unit/test_metadata.py b/tests/unit/test_metadata.py index f95b5ac..e3ae9f8 100644 --- a/tests/unit/test_metadata.py +++ b/tests/unit/test_metadata.py @@ -1,12 +1,10 @@ -import re - from vault_cli import metadata def test_extract_metadata(): result = metadata.extract_metadata() - assert re.match(r"\d+\.\d+\.\d+(\.dev0)?", result.pop("version")) + assert result.pop("version") assert result == { "author": "PeopleDoc",