From 8bf42154462114948cde25eed6bb10038a82c2a5 Mon Sep 17 00:00:00 2001 From: Mike Gouline <1960272+gouline@users.noreply.github.com> Date: Sun, 1 Dec 2024 17:19:00 +1100 Subject: [PATCH] fix scm version for release builds (#293) --- .github/workflows/master.yml | 2 ++ Makefile | 1 + pyproject.toml | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 8e616825..6e8a761d 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -27,6 +27,8 @@ jobs: run: make dependencies - name: Build + env: + SETUPTOOLS_SCM_PRETEND_VERSION: ${{ github.event.release.tag_name }} run: make build - name: Publish a Python distribution to PyPI diff --git a/Makefile b/Makefile index 2910d3e9..ecd1f96c 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,6 @@ .PHONY: dependencies dependencies: + SETUPTOOLS_SCM_PRETEND_VERSION=0.0.0 \ uv sync --no-install-project --all-extras --frozen .PHONY: upgrade diff --git a/pyproject.toml b/pyproject.toml index 5547e187..7fa5476d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [build-system] -requires = ["setuptools", "setuptools-scm"] +requires = ["setuptools~=75.3.0", "setuptools-scm~=8.1.0"] build-backend = "setuptools.build_meta" [project]