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
4 changes: 4 additions & 0 deletions changelog/13933.contrib.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
The tox configuration has been adjusted to make sure the desired
version string can be passed into its :ref:`package_env` through
the ``SETUPTOOLS_SCM_PRETEND_VERSION_FOR_PYTEST`` environment
variable as a part of the release process -- by :user:`webknjaz`.
1 change: 1 addition & 0 deletions changelog/13933.packaging.rst
23 changes: 20 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,26 @@ envlist =



[pkgenv]
# NOTE: This section tweaks how Tox manages the PEP 517 build
# NOTE: environment where it assembles wheels (editable and regular)
# NOTE: for further installing them into regular testenvs.
#
# NOTE: `[testenv:.pkg]` does not work due to a regression in tox v4.14.1
# NOTE: so `[pkgenv]` is being used in place of it.
# Refs:
# * https://github.com/tox-dev/tox/pull/3237
# * https://github.com/tox-dev/tox/issues/3238
# * https://github.com/tox-dev/tox/issues/3292
# * https://hynek.me/articles/turbo-charge-tox/
#
# NOTE: The `SETUPTOOLS_SCM_PRETEND_VERSION_FOR_PYTEST` environment
# NOTE: variable allows enforcing a pre-determined version for use in
# NOTE: the wheel being installed into usual testenvs.
pass_env =
SETUPTOOLS_SCM_PRETEND_VERSION_FOR_PYTEST


[testenv]
description =
run the tests
Expand All @@ -49,7 +69,6 @@ passenv =
COVERAGE_*
PYTEST_ADDOPTS
TERM
SETUPTOOLS_SCM_PRETEND_VERSION_FOR_PYTEST
CI
setenv =
_PYTEST_TOX_DEFAULT_POSARGS={env:_PYTEST_TOX_POSARGS_DOCTESTING:} {env:_PYTEST_TOX_POSARGS_LSOF:} {env:_PYTEST_TOX_POSARGS_XDIST:} {env:_PYTEST_FILES:}
Expand Down Expand Up @@ -141,8 +160,6 @@ setenv =
description =
regenerate documentation examples under `{basepython}`
changedir = doc/en
passenv =
SETUPTOOLS_SCM_PRETEND_VERSION_FOR_PYTEST
deps =
PyYAML
regendoc>=0.8.1
Expand Down