From 28afba6c28ca336e6c58a6e750f09b617c9abbcc Mon Sep 17 00:00:00 2001 From: Ronny Pfannschmidt Date: Sun, 13 Dec 2020 11:10:06 +0100 Subject: [PATCH] fixes #8133: migrate to setuptools_scm 5.x and use SETUPTOOLS_SCM_PRETEND_VERSION_FOR_PYTEST --- .github/workflows/main.yml | 2 +- pyproject.toml | 2 +- scripts/release.py | 2 +- tox.ini | 6 +----- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2b779279fdc..20fb7f86c83 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -190,7 +190,7 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install --upgrade wheel setuptools tox + pip install --upgrade wheel setuptools setuptools_scm[toml] tox - name: Build package run: | python setup.py sdist bdist_wheel diff --git a/pyproject.toml b/pyproject.toml index dd4be6c22d5..444c925374b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,7 @@ requires = [ # sync with setup.py until we discard non-pep-517/518 "setuptools>=42.0", - "setuptools-scm[toml]>=3.4", + "setuptools-scm[toml]>=5.0", "wheel", ] build-backend = "setuptools.build_meta" diff --git a/scripts/release.py b/scripts/release.py index 798e42e1fe0..5bd8f9efb3c 100644 --- a/scripts/release.py +++ b/scripts/release.py @@ -63,7 +63,7 @@ def regen(version): print(f"{Fore.CYAN}[generate.regen] {Fore.RESET}Updating docs") check_call( ["tox", "-e", "regen"], - env={**os.environ, "SETUPTOOLS_SCM_PRETEND_VERSION": version}, + env={**os.environ, "SETUPTOOLS_SCM_PRETEND_VERSION_FOR_PYTEST": version}, ) diff --git a/tox.ini b/tox.ini index f0cfaa460fb..2724a80f6cf 100644 --- a/tox.ini +++ b/tox.ini @@ -84,9 +84,7 @@ commands = [testenv:regen] changedir = doc/en basepython = python3 -passenv = SETUPTOOLS_SCM_PRETEND_VERSION -# TODO: When setuptools-scm 5.0.0 is released, use SETUPTOOLS_SCM_PRETEND_VERSION_FOR_PYTEST -# and remove the next line. +passenv = SETUPTOOLS_SCM_PRETEND_VERSION_FOR_PYTEST install_command=python -m pip --use-deprecated=legacy-resolver install {opts} {packages} deps = dataclasses @@ -113,8 +111,6 @@ changedir = testing/plugins_integration deps = -rtesting/plugins_integration/requirements.txt setenv = PYTHONPATH=. - # due to pytest-rerunfailures requiring 6.2+; can be removed after 6.2.0 - SETUPTOOLS_SCM_PRETEND_VERSION=6.2.0a1 commands = pip check pytest bdd_wallet.py