From 2369251d0b5891e3888c231f702c42ee8bf2ce3d Mon Sep 17 00:00:00 2001 From: Mathieu Westphal Date: Thu, 28 Dec 2023 14:45:57 +0100 Subject: [PATCH 1/2] Add _version.py to git ignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 87c864d2e1..d8cdd1977e 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ dist *.egg-info __pycache__ *.pyc +_version.py From 407529b646ace22da2bc148ce07ead2d52561801 Mon Sep 17 00:00:00 2001 From: Mathieu Westphal Date: Thu, 28 Dec 2023 14:14:10 +0100 Subject: [PATCH 2/2] Fix python wheel versioning --- pyproject.toml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 38a045d6fa..ad7386701d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ build-backend = "scikit_build_core.build" [project] name = "f3d" requires-python = ">=3.8" -version = "2.2.1" +dynamic = ["version"] description = "F3D, a fast and minimalist 3D viewer" readme = "README.md" license = {text = "BSD 3-Clause License"} @@ -37,14 +37,20 @@ Changelog = "https://github.com/f3d-app/f3d/blob/master/doc/CHANGELOG.md" [tool.scikit-build] minimum-version = "0.4" -cmake.minimum-version = "3.21" -cmake.build-type = "Release" install.components = ["library", "plugin", "python", "dependencies"] -ninja.minimum-version = "1.10" +metadata.version.provider = "scikit_build_core.metadata.setuptools_scm" +sdist.include = ["_version.py"] +cmake.build-type = "Release" +cmake.minimum-version = "3.21" ninja.make-fallback = false -wheel.packages = [] +ninja.minimum-version = "1.10" wheel.install-dir = "f3d" wheel.license-files = ["LICENSE.md", "doc/THIRD_PARTY_LICENSES.md"] +wheel.packages = [] + +[tool.setuptools_scm] +write_to = "_version.py" +fallback_version = "2.2.1" [tool.scikit-build.cmake.define] CMAKE_OSX_DEPLOYMENT_TARGET = "10.15"