diff --git a/pyproject.toml b/pyproject.toml index 2758c52..21344f0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [build-system] requires = [ "setuptools >= 61.0", - "scmver", + "scmver[toml] >= 1.7", ] build-backend = "setuptools.build_meta" @@ -49,6 +49,11 @@ zopfli = [ "*.pyi", ] +[tool.scmver] +spec = "micro" +write-to = "zopfli/__version__.py" +fallback = {attr = "__version__:version", path = "zopfli"} + [tool.coverage.run] branch = true diff --git a/setup.py b/setup.py index 91c23d0..3a9527f 100644 --- a/setup.py +++ b/setup.py @@ -54,10 +54,4 @@ def run(self): cmdclass={ 'test': test, }, - scmver={ - 'root': os.path.dirname(os.path.abspath(__file__)), - 'spec': 'micro', - 'write_to': os.path.join('zopfli', '__version__.py'), - 'fallback': ['__version__:version', 'zopfli'], - }, ) diff --git a/tox.ini b/tox.ini index cc4a611..512c70d 100644 --- a/tox.ini +++ b/tox.ini @@ -10,7 +10,7 @@ deps = flake8 >= 3.6 flake8-bugbear mypy - scmver + scmver[toml] >= 1.7 passenv = *FLAGS, DISTUTILS_*, INCLUDE, LC_*, LIB, MSSdk, Program*, SETUPTOOLS_* commands = # test