From 0b95efa0a9b516450a66425a5e43e3cbba8fc215 Mon Sep 17 00:00:00 2001 From: num0005 Date: Sat, 14 Dec 2024 21:18:57 +0000 Subject: [PATCH] Disable local version suffix only on CI builds Pypi blocks the uploading of packages with a local version even on the test instance --- .github/workflows/build.yml | 2 ++ pyproject.toml | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c46783b..021d42e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,6 +18,8 @@ jobs: with: allow-prereleases: true python-version: "3.13" + - name: Disable local version + run: sed -i -e '/\[tool.setuptools_scm\]/a\' -e 'local_scheme = "no-local-version"' pyproject.toml - name: Install build tool run: python -m pip install build --user - name: build diff --git a/pyproject.toml b/pyproject.toml index 9f293bf..2abc471 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,5 +26,5 @@ include-package-data = true [tool.setuptools.package-dir] +# needed, CI will insert local_scheme = "no-local-version" using sed [tool.setuptools_scm] -local_scheme = "no-local-version" \ No newline at end of file