Skip to content

Commit ec4aed7

Browse files
authored
ci: make published package version dynamic (#45)
Auto-set project's version attribute based on git tag, so pypi published package has the right version.
1 parent 8b9c0a3 commit ec4aed7

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

pyproject.toml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,22 @@
1919
# ===================================================================
2020
[project]
2121
name = "ml-flashpoint"
22-
version = "0.0.0"
22+
dynamic = [ "version" ]
2323
description = "A memory-first, lightning fast, easy-to-use ML checkpointing library."
24+
readme = "README.md"
25+
license = { file = "LICENSE" }
26+
classifiers = [
27+
"Intended Audience :: Developers",
28+
"Intended Audience :: Science/Research",
29+
"License :: OSI Approved :: Apache Software License",
30+
"Operating System :: POSIX :: Linux",
31+
"Programming Language :: Python :: 3",
32+
"Programming Language :: Python :: 3.10",
33+
"Programming Language :: Python :: 3.11",
34+
"Programming Language :: Python :: 3.12",
35+
"Topic :: Scientific/Engineering :: Artificial Intelligence",
36+
"Topic :: Software Development :: Libraries :: Python Modules",
37+
]
2438

2539
# Specifies the minimum version of Python required to install and run this package.
2640
requires-python = ">=3.10"
@@ -101,6 +115,7 @@ requires = [
101115
"scikit-build-core==0.11.6",
102116
"cmake==3.31.10",
103117
"ninja==1.11.1.3",
118+
"setuptools-scm==9.2.2",
104119
]
105120

106121
# The Python object that `pip` will call to execute the build.
@@ -114,6 +129,9 @@ build-backend = "scikit_build_core.build"
114129
# ===================================================================
115130
[tool.scikit-build]
116131

132+
# Tells scikit-build-core to use setuptools-scm to retrieve the version from git.
133+
metadata.version.provider = "scikit_build_core.metadata.setuptools_scm"
134+
117135
# Specifies the minimum version of CMake that must be present on the system.
118136
cmake.version = ">=3.18"
119137

0 commit comments

Comments
 (0)