mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-04-07 10:56:49 +00:00
Merge pull request #524 from meejah/2942.towncrier-draft
add a 'draftnews' tox environment
This commit is contained in:
commit
e178d7d809
1
newsfragments/2942.feature
Normal file
1
newsfragments/2942.feature
Normal file
@ -0,0 +1 @@
|
||||
Add a "tox -e draftnews" which runs towncrier in draft mode
|
@ -1,6 +1,6 @@
|
||||
[tool.towncrier]
|
||||
package = "allmydata"
|
||||
package_dir = "src"
|
||||
package = "allmydata"
|
||||
filename = "NEWS.rst"
|
||||
directory = "newsfragments"
|
||||
start_string = ".. towncrier start line"
|
||||
|
26
tox.ini
26
tox.ini
@ -98,6 +98,32 @@ commands =
|
||||
# file. See pyproject.toml for legal <change type> values.
|
||||
python -m towncrier.check
|
||||
|
||||
[testenv:draftnews]
|
||||
passenv = TAHOE_LAFS_* PIP_* SUBUNITREPORTER_* USERPROFILE HOMEDRIVE HOMEPATH
|
||||
# see comment in [testenv] about "certifi"
|
||||
whitelist_externals = mv
|
||||
deps =
|
||||
certifi
|
||||
towncrier >= 19.2
|
||||
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
|
||||
|
||||
# towncrier 19.2 + works with python2.7
|
||||
python -m towncrier --draft
|
||||
|
||||
# put it back
|
||||
mv pyproject.toml towncrier.pyproject.toml
|
||||
|
||||
|
||||
[testenv:deprecations]
|
||||
setenv =
|
||||
PYTHONWARNINGS=default::DeprecationWarning
|
||||
|
Loading…
x
Reference in New Issue
Block a user