diff --git a/CMakeLists.txt b/CMakeLists.txt index 7598afd..31d2ebe 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,15 @@ cmake_minimum_required(VERSION 3.18...3.30) + +# Version is sourced from setuptools-scm via scikit-build-core (git tags). +# Fallback only applies for standalone CMake invocations outside the build +# backend. +if(NOT DEFINED SKBUILD_PROJECT_VERSION) + set(SKBUILD_PROJECT_VERSION "0.0.0") +endif() + project( OmniMalloc - VERSION 0.3.0 # Also update pyproject.toml + VERSION ${SKBUILD_PROJECT_VERSION} LANGUAGES CXX) set(CMAKE_CXX_STANDARD 20) diff --git a/pyproject.toml b/pyproject.toml index de71e4f..8086959 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,10 +1,10 @@ [build-system] -requires = ["scikit-build-core>=0.11", "nanobind>=2.0"] +requires = ["scikit-build-core>=0.11", "nanobind>=2.0", "setuptools-scm>=8"] build-backend = "scikit_build_core.build" [project] name = "omnimalloc" -version = "0.3.0" # Also update CMakeLists.txt +dynamic = ["version"] description = "Your one-stop shop for static memory allocation." readme = { file = "README.md", content-type = "text/markdown" } requires-python = ">=3.10" @@ -65,6 +65,13 @@ build-dir = "build/{wheel_tag}" sdist.include = ["src/cpp/**"] sdist.exclude = [".github", "notebooks", "external"] +[tool.scikit-build.metadata.version] +provider = "scikit_build_core.metadata.setuptools_scm" + +[tool.setuptools_scm] +version_scheme = "no-guess-dev" +local_scheme = "dirty-tag" + [tool.cibuildwheel] build = "cp310-* cp311-* cp312-* cp313-*" skip = "*-musllinux_*" diff --git a/uv.lock b/uv.lock index 3ed3c5a..2fc0154 100644 --- a/uv.lock +++ b/uv.lock @@ -1551,7 +1551,6 @@ wheels = [ [[package]] name = "omnimalloc" -version = "0.2.0" source = { editable = "." } dependencies = [ { name = "numpy", version = "2.2.6", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.11'" },