From 70bac8dd0786d5bc60e9ba4c94dde2015d58eb10 Mon Sep 17 00:00:00 2001 From: David Meyer Date: Fri, 9 Feb 2024 13:34:11 -0500 Subject: [PATCH] Ensure setuptools_scm uses `release-branch-semver` Updates setuptools and setuptools_scm pins in the build. --- blacs/__version__.py | 2 +- pyproject.toml | 4 +++- setup.py | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/blacs/__version__.py b/blacs/__version__.py index a88075a..15d1c35 100644 --- a/blacs/__version__.py +++ b/blacs/__version__.py @@ -10,7 +10,7 @@ from setuptools_scm import get_version __version__ = get_version( root, - version_scheme="release-branch-semver", + version_scheme=os.getenv("SCM_VERSION_SCHEME", "release-branch-semver"), local_scheme=os.getenv("SCM_LOCAL_SCHEME", "node-and-date"), ) else: diff --git a/pyproject.toml b/pyproject.toml index 4cd0fd9..3a61336 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,5 @@ [build-system] -requires = ["setuptools", "wheel", "setuptools_scm>=4.1.0"] +requires = ["setuptools>=64", "wheel", "setuptools_scm>=8"] build-backend = "setuptools.build_meta" + +[tool.setuptools_scm] \ No newline at end of file diff --git a/setup.py b/setup.py index f11f990..8e0afd8 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ setup( use_scm_version={ - "version_scheme": "release-branch-semver", + "version_scheme": os.getenv("SCM_VERSION_SCHEME", "release-branch-semver"), "local_scheme": os.getenv("SCM_LOCAL_SCHEME", "node-and-date"), } )