Skip to content

Commit

Permalink
🎨Only use setuptools-scm-git-archive under < py37
Browse files Browse the repository at this point in the history
`setuptools-scm` support Git archives natively starting v7 but it only
supports Python 3.7 or higher. This patch makes up a set of
conditional build dependencies that add `setuptools-scm-git-archive`
only below Python 3.7 and in combination with an older version of
`setuptools-scm`.
  • Loading branch information
webknjaz committed Jan 17, 2024
1 parent b86e65f commit 3295a7c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,12 @@ requires = [
"expandvars", # needed by in-tree build backend for env vars interpolation

# 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'",
]
backend-path = ["packaging"] # requires 'Pip>=20' or 'pep517>=0.6.0'
build-backend = "pep517_backend.hooks"
Expand Down

0 comments on commit 3295a7c

Please sign in to comment.