Skip to content

Commit 420de52

Browse files
committed
dynamic version
1 parent 0aab3c0 commit 420de52

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

‎pyproject.toml‎

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ build-backend = "scikit_build_core.build"
88

99
[project]
1010
name = "ecole"
11-
version = "0.8.1"
11+
dynamic = ["version"]
1212
description = "Extensible Combinatorial Optimization Learning Environments"
1313
readme = "README.rst"
1414
license = "BSD-3-Clause"
@@ -42,5 +42,18 @@ CMAKE_INSTALL_BINDIR = "bin"
4242
CMAKE_INSTALL_INCLUDEDIR = "include"
4343
ECOLE_PY_EXT_INSTALL_LIBDIR = "."
4444

45+
[tool.scikit-build.metadata.version]
46+
provider = "scikit_build_core.metadata.regex"
47+
input = "VERSION"
48+
regex = '''(?sx)
49+
VERSION_MAJOR\s+(?P<major>\d+).*?
50+
VERSION_MINOR\s+(?P<minor>\d+).*?
51+
VERSION_PATCH\s+(?P<patch>\d+).*?
52+
VERSION_PRE\s+(?P<pre>[^\s\#]*).*?
53+
VERSION_POST\s+(?P<post>[^\s\#]*).*?
54+
VERSION_DEV\s+(?P<dev>[^\s\#]*)
55+
'''
56+
result = "{major}.{minor}.{patch}{pre}{post}{dev}"
57+
4558
[tool.black]
4659
line-length = 100

0 commit comments

Comments
 (0)