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..232598ff55 100644 --- a/requirements/dist-build-constraints.in +++ b/requirements/dist-build-constraints.in @@ -5,8 +5,7 @@ setuptools >= 34.4 # Plugins -setuptools_scm[toml] >= 3.5 -setuptools_scm_git_archive >= 1.1 +setuptools_scm[toml] >= 3.5, < 7.0.0 # Dynamic (coming from setuptools' PEP 517 build backend) wheel diff --git a/setup.cfg b/setup.cfg index 1f2b08f4c3..8cd055dfbc 100644 --- a/setup.cfg +++ b/setup.cfg @@ -65,7 +65,6 @@ include_package_data = True # These are required during `setup.py` run: setup_requires = setuptools_scm>=1.15.0 - setuptools_scm_git_archive>=1.0 # These are required in actual runtime: install_requires =