Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,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]>=6 tox

- name: Build package
run: |
Expand Down
1 change: 1 addition & 0 deletions changelog/8133.trivial.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Migrate to setuptools_scm 6.x to use SETUPTOOLS_SCM_PRETEND_VERSION_FOR_PYTEST for more robust release tooling.
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[build-system]
requires = [
# sync with setup.py until we discard non-pep-517/518
"setuptools>=42.0",
"setuptools-scm[toml]>=3.4",
"setuptools>=45.0",
"setuptools-scm[toml]>=6.2.3",
"wheel",
]
build-backend = "setuptools.build_meta"
Expand Down
2 changes: 1 addition & 1 deletion scripts/release.py
Original file line number Diff line number Diff line change
Expand Up @@ -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},
)


Expand Down
4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ python_requires = >=3.6
package_dir =
=src
setup_requires =
setuptools>=42.0
setuptools-scm>=3.4
setuptools
setuptools-scm>=6.0
zip_safe = no

[options.entry_points]
Expand Down
12 changes: 5 additions & 7 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,15 @@ envlist =
docs
docs-checklinks



[testenv]
commands =
{env:_PYTEST_TOX_COVERAGE_RUN:} pytest {posargs:{env:_PYTEST_TOX_DEFAULT_POSARGS:}}
doctesting: {env:_PYTEST_TOX_COVERAGE_RUN:} pytest --doctest-modules --pyargs _pytest
coverage: coverage combine
coverage: coverage report -m
passenv = USER USERNAME COVERAGE_* PYTEST_ADDOPTS TERM
passenv = USER USERNAME COVERAGE_* PYTEST_ADDOPTS TERM SETUPTOOLS_SCM_PRETEND_VERSION_FOR_PYTEST
setenv =
_PYTEST_TOX_DEFAULT_POSARGS={env:_PYTEST_TOX_POSARGS_DOCTESTING:} {env:_PYTEST_TOX_POSARGS_LSOF:} {env:_PYTEST_TOX_POSARGS_XDIST:}

Expand Down Expand Up @@ -83,10 +85,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.
install_command=python -m pip --use-deprecated=legacy-resolver install {opts} {packages}
passenv = SETUPTOOLS_SCM_PRETEND_VERSION_FOR_PYTEST
deps =
dataclasses
PyYAML
Expand All @@ -112,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
Expand Down Expand Up @@ -180,6 +177,7 @@ extend-ignore =
; Docstring Content Issues
D400,D401,D401,D402,D405,D406,D407,D408,D409,D410,D411,D412,D413,D414,D415,D416,D417


[isort]
; This config mimics what reorder-python-imports does.
force_single_line = 1
Expand Down