fixes #8133: mitigate regendoc issues wrt PRETEND_VERSION
this issues is less likely to hit due to the recent regendoc release which includes a wheel * migrate to setuptools_scm 6.3.2 * use SETUPTOOLS_SCM_PRETEND_VERSION_FOR_PYTEST
This commit is contained in:
parent
0fbfd1ca36
commit
0892c77bc6
|
@ -222,7 +222,7 @@ jobs:
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip
|
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
|
- name: Build package
|
||||||
run: |
|
run: |
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
Migrate to setuptools_scm 6.x to use SETUPTOOLS_SCM_PRETEND_VERSION_FOR_PYTEST for more robust release tooling.
|
|
@ -1,8 +1,8 @@
|
||||||
[build-system]
|
[build-system]
|
||||||
requires = [
|
requires = [
|
||||||
# sync with setup.py until we discard non-pep-517/518
|
# sync with setup.py until we discard non-pep-517/518
|
||||||
"setuptools>=42.0",
|
"setuptools>=45.0",
|
||||||
"setuptools-scm[toml]>=3.4",
|
"setuptools-scm[toml]>=6.2.3",
|
||||||
"wheel",
|
"wheel",
|
||||||
]
|
]
|
||||||
build-backend = "setuptools.build_meta"
|
build-backend = "setuptools.build_meta"
|
||||||
|
|
|
@ -63,7 +63,7 @@ def regen(version):
|
||||||
print(f"{Fore.CYAN}[generate.regen] {Fore.RESET}Updating docs")
|
print(f"{Fore.CYAN}[generate.regen] {Fore.RESET}Updating docs")
|
||||||
check_call(
|
check_call(
|
||||||
["tox", "-e", "regen"],
|
["tox", "-e", "regen"],
|
||||||
env={**os.environ, "SETUPTOOLS_SCM_PRETEND_VERSION": version},
|
env={**os.environ, "SETUPTOOLS_SCM_PRETEND_VERSION_FOR_PYTEST": version},
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -55,8 +55,8 @@ python_requires = >=3.6
|
||||||
package_dir =
|
package_dir =
|
||||||
=src
|
=src
|
||||||
setup_requires =
|
setup_requires =
|
||||||
setuptools>=42.0
|
setuptools
|
||||||
setuptools-scm>=3.4
|
setuptools-scm>=6.0
|
||||||
zip_safe = no
|
zip_safe = no
|
||||||
|
|
||||||
[options.entry_points]
|
[options.entry_points]
|
||||||
|
|
12
tox.ini
12
tox.ini
|
@ -17,13 +17,15 @@ envlist =
|
||||||
docs
|
docs
|
||||||
docs-checklinks
|
docs-checklinks
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
commands =
|
commands =
|
||||||
{env:_PYTEST_TOX_COVERAGE_RUN:} pytest {posargs:{env:_PYTEST_TOX_DEFAULT_POSARGS:}}
|
{env:_PYTEST_TOX_COVERAGE_RUN:} pytest {posargs:{env:_PYTEST_TOX_DEFAULT_POSARGS:}}
|
||||||
doctesting: {env:_PYTEST_TOX_COVERAGE_RUN:} pytest --doctest-modules --pyargs _pytest
|
doctesting: {env:_PYTEST_TOX_COVERAGE_RUN:} pytest --doctest-modules --pyargs _pytest
|
||||||
coverage: coverage combine
|
coverage: coverage combine
|
||||||
coverage: coverage report -m
|
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 =
|
setenv =
|
||||||
_PYTEST_TOX_DEFAULT_POSARGS={env:_PYTEST_TOX_POSARGS_DOCTESTING:} {env:_PYTEST_TOX_POSARGS_LSOF:} {env:_PYTEST_TOX_POSARGS_XDIST:}
|
_PYTEST_TOX_DEFAULT_POSARGS={env:_PYTEST_TOX_POSARGS_DOCTESTING:} {env:_PYTEST_TOX_POSARGS_LSOF:} {env:_PYTEST_TOX_POSARGS_XDIST:}
|
||||||
|
|
||||||
|
@ -83,10 +85,7 @@ commands =
|
||||||
[testenv:regen]
|
[testenv:regen]
|
||||||
changedir = doc/en
|
changedir = doc/en
|
||||||
basepython = python3
|
basepython = python3
|
||||||
passenv = SETUPTOOLS_SCM_PRETEND_VERSION
|
passenv = SETUPTOOLS_SCM_PRETEND_VERSION_FOR_PYTEST
|
||||||
# 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}
|
|
||||||
deps =
|
deps =
|
||||||
dataclasses
|
dataclasses
|
||||||
PyYAML
|
PyYAML
|
||||||
|
@ -112,8 +111,6 @@ changedir = testing/plugins_integration
|
||||||
deps = -rtesting/plugins_integration/requirements.txt
|
deps = -rtesting/plugins_integration/requirements.txt
|
||||||
setenv =
|
setenv =
|
||||||
PYTHONPATH=.
|
PYTHONPATH=.
|
||||||
# due to pytest-rerunfailures requiring 6.2+; can be removed after 6.2.0
|
|
||||||
SETUPTOOLS_SCM_PRETEND_VERSION=6.2.0a1
|
|
||||||
commands =
|
commands =
|
||||||
pip check
|
pip check
|
||||||
pytest bdd_wallet.py
|
pytest bdd_wallet.py
|
||||||
|
@ -180,6 +177,7 @@ extend-ignore =
|
||||||
; Docstring Content Issues
|
; Docstring Content Issues
|
||||||
D400,D401,D401,D402,D405,D406,D407,D408,D409,D410,D411,D412,D413,D414,D415,D416,D417
|
D400,D401,D401,D402,D405,D406,D407,D408,D409,D410,D411,D412,D413,D414,D415,D416,D417
|
||||||
|
|
||||||
|
|
||||||
[isort]
|
[isort]
|
||||||
; This config mimics what reorder-python-imports does.
|
; This config mimics what reorder-python-imports does.
|
||||||
force_single_line = 1
|
force_single_line = 1
|
||||||
|
|
Loading…
Reference in New Issue