From d1e44ab066c5a588c4967bba2a48c372b0cd2037 Mon Sep 17 00:00:00 2001 From: Lars Bilke <lars.bilke@ufz.de> Date: Thu, 26 Jan 2023 08:26:11 +0000 Subject: [PATCH] [wheel] Fix versioning scheme. --- pyproject.toml | 4 ---- setup.py | 5 ++++- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index c347e4642be..b8e34812fbe 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,10 +9,6 @@ requires = [ ] build-backend = "setuptools.build_meta" -[tool.setuptools_scm] -# added --abbrev=8 to force consistent length -git_describe_command = "git describe --dirty --tags --long --match \"*[0-9]*\" --abbrev=8" - [tool.pytest.ini_options] testpaths = ["Tests"] norecursedirs = ["Tests/Data"] diff --git a/setup.py b/setup.py index 33a36c70c66..b5f045ebb08 100644 --- a/setup.py +++ b/setup.py @@ -35,7 +35,7 @@ if "SETUPTOOLS_SCM_LOCAL_SCHEME" in os.environ: cmake_args = [f"--preset {cmake_preset}", "-B ."] if "SKBUILD_GENERATOR" in os.environ: - cmake_args.extend(['-G', os.environ["SKBUILD_GENERATOR"]]) + cmake_args.extend(["-G", os.environ["SKBUILD_GENERATOR"]]) setup( name="ogs", @@ -58,5 +58,8 @@ setup( # This would be in line with PEP 440, switch OGS versioning too? "version_scheme": "no-guess-dev", "local_scheme": scm_local_scheme, + # Was in pyproject.toml but it somehow reset the version scheme. Maybe + # it is better to do all scm config here. + "git_describe_command": 'git describe --dirty --tags --long --match "*[0-9]*" --abbrev=8', }, ) -- GitLab