From 10864954d683885a1a8cc7adb53994cd73d98ed4 Mon Sep 17 00:00:00 2001 From: Keewis Date: Tue, 7 Jun 2022 00:02:21 +0200 Subject: [PATCH] pin setuptools in the modify script --- .github/workflows/configure-testpypi-version.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/configure-testpypi-version.py b/.github/workflows/configure-testpypi-version.py index d22ba94bd96..c4359d29e73 100644 --- a/.github/workflows/configure-testpypi-version.py +++ b/.github/workflows/configure-testpypi-version.py @@ -38,10 +38,13 @@ def update(mapping, path, value, sep="/"): content = args.path.read_text() decoded = tomli.loads(content) -updated = update( +with_local_scheme = update( decoded, "tool.setuptools_scm.local_scheme", "no-local-version", sep="." ) +# work around a bug in setuptools / setuptools-scm +with_setuptools_pin = copy.deepcopy(with_local_scheme) +requires = extract(with_setuptools_pin, "build-system.requires", sep=".") +requires[0] = "setuptools>=42,<60" -new_content = tomli_w.dumps(updated) - +new_content = tomli_w.dumps(with_setuptools_pin) args.path.write_text(new_content)