diff --git a/.git_archival.txt b/.git_archival.txt index 95cb3eea4e..3994ec0a83 100644 --- a/.git_archival.txt +++ b/.git_archival.txt @@ -1 +1,4 @@ +node: $Format:%H$ +node-date: $Format:%cI$ +describe-name: $Format:%(describe:tags=true)$ ref-names: $Format:%D$ diff --git a/pyproject.toml b/pyproject.toml index b1e5f60a80..fa315290ef 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,8 +6,12 @@ requires = [ "setuptools>=34.4", # Plugins - "setuptools_scm[toml]>=3.5", - "setuptools_scm_git_archive>=1.1", + "setuptools-scm >= 7.0.0; python_version >= '3.7'", + # ^ supports git archives through a plugin + # | | + # supports git archives natively V + "setuptools-scm[toml] >= 3.5, < 7.0.0; python_version < '3.7'", + "setuptools-scm-git-archive >= 1.1; python_version < '3.7'", ] build-backend = "setuptools.build_meta" diff --git a/requirements/dist-build-constraints.in b/requirements/dist-build-constraints.in index 26b57228a9..437748fef2 100644 --- a/requirements/dist-build-constraints.in +++ b/requirements/dist-build-constraints.in @@ -5,7 +5,6 @@ setuptools >= 34.4 # Plugins -setuptools_scm[toml] >= 3.5 setuptools_scm_git_archive >= 1.1 # Dynamic (coming from setuptools' PEP 517 build backend) diff --git a/setup.cfg b/setup.cfg index 1f2b08f4c3..9e25a0deb0 100644 --- a/setup.cfg +++ b/setup.cfg @@ -64,8 +64,7 @@ include_package_data = True # These are required during `setup.py` run: setup_requires = - setuptools_scm>=1.15.0 - setuptools_scm_git_archive>=1.0 + setuptools_scm >= 7.0.0; python_version >= '3.7'" # These are required in actual runtime: install_requires =