add a 'draftnews' tox environment

This commit is contained in:
meejah 2018-08-27 17:44:17 -06:00
parent 325c522d7c
commit 23cd5f1526
2 changed files with 38 additions and 2 deletions

View File

@ -1,6 +1,8 @@
[tool.towncrier]
package = "allmydata"
package_dir = "src"
# towncrier requires python3.5+ but Tahoe-LAFS doesn't support that
# so we can't import it -- must specify --version to towncrier
# package = "allmydata"
# package_dir = "src"
filename = "NEWS.rst"
directory = "newsfragments"
start_string = ".. towncrier start line"

34
tox.ini
View File

@ -67,6 +67,40 @@ commands =
# file. See pyproject.toml for legal <change type> values.
python -m towncrier.check
[testenv:draftnews]
basepython=python3.6
passenv = TAHOE_LAFS_* PIP_* SUBUNITREPORTER_* USERPROFILE HOMEDRIVE HOMEPATH
# Get "certifi" to avoid bug #2913. Basically if a `setup_requires=...` causes
# a package to be installed (with setuptools) then it'll fail on certain
# platforms (travis's OX-X 10.12, Slackware 14.2) because PyPI's TLS
# requirements (TLS >= 1.2) are incompatible with the old TLS clients
# available to those systems. Installing it ahead of time (with pip) avoids
# this problem.
whitelist_externals = mv
deps =
certifi
towncrier
skip_install = true
commands =
# With pip >= 10 the existence of pyproject.toml (which we are
# required to have to configure towncrier) triggers a "build
# isolation" mode which prevents anything from working. Avoid
# triggering that pip behavior by keeping the towncrier configuration
# somewhere else and only bringing it in when it's actually needed
# (after pip is done).
#
# Some discussion is available at
# https://github.com/pypa/pip/issues/5696
mv towncrier.pyproject.toml pyproject.toml
# this burns in another copy of the version -- but we can't
# import tahoe until it supports python3.5+
python -m towncrier --draft --version 1.14.0
# put it back
mv pyproject.toml towncrier.pyproject.toml
[testenv:deprecations]
setenv =
PYTHONWARNINGS=default::DeprecationWarning