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..4ec9cb0adb 100644 --- a/requirements/dist-build-constraints.in +++ b/requirements/dist-build-constraints.in @@ -5,7 +5,7 @@ setuptools >= 34.4 # Plugins -setuptools_scm[toml] >= 3.5 +setuptools_scm[toml] >= 3.5, < 7.0.0; python_version < '3.7' setuptools_scm_git_archive >= 1.1 # Dynamic (coming from setuptools' PEP 517 build backend) diff --git a/requirements/dist-build-constraints.txt b/requirements/dist-build-constraints.txt index 525f2be30f..98d61939da 100644 --- a/requirements/dist-build-constraints.txt +++ b/requirements/dist-build-constraints.txt @@ -1,24 +1,14 @@ # -# This file is autogenerated by pip-compile with python 3.10 -# To update, run: +# This file is autogenerated by pip-compile with Python 3.10 +# by the following command: # # pip-compile --allow-unsafe --output-file=requirements/dist-build-constraints.txt --strip-extras requirements/dist-build-constraints.in # -packaging==21.3 - # via setuptools-scm -pyparsing==3.0.6 - # via packaging -setuptools-scm==6.3.2 - # via -r requirements/dist-build-constraints.in setuptools-scm-git-archive==1.1 # via -r requirements/dist-build-constraints.in -tomli==2.0.0 - # via setuptools-scm wheel==0.37.1 # via -r requirements/dist-build-constraints.in # The following packages are considered to be unsafe in a requirements file: setuptools==60.2.0 - # via - # -r requirements/dist-build-constraints.in - # setuptools-scm + # via -r requirements/dist-build-constraints.in diff --git a/setup.cfg b/setup.cfg index 1f2b08f4c3..570edbe974 100644 --- a/setup.cfg +++ b/setup.cfg @@ -64,8 +64,8 @@ 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>=1.15.0; python_version =< '3.6'" + setuptools_scm>= 7.0.0; python_version >= '3.7'" # These are required in actual runtime: install_requires =