use --pyproject

This commit is contained in:
Jean-Paul Calderone 2020-01-09 14:20:33 -05:00
parent b9e794a5c8
commit 55b87b264c

19
tox.ini

@ -81,25 +81,11 @@ commands =
python misc/coding_tools/find-trailing-spaces.py -r src static misc setup.py
python misc/coding_tools/check-miscaptures.py
# 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
# If towncrier.check fails, you forgot to add a towncrier news
# fragment explaining the change in this branch. Create one at
# `newsfragments/<ticket>.<change type>` with some text for the news
# file. See pyproject.toml for legal <change type> values.
python -m towncrier.check
# put it back
mv pyproject.toml towncrier.pyproject.toml
python -m towncrier.check --pyproject towncrier.pyproject.toml
[testenv:draftnews]
passenv = TAHOE_LAFS_* PIP_* SUBUNITREPORTER_* USERPROFILE HOMEDRIVE HOMEPATH
@ -118,6 +104,9 @@ commands =
#
# Some discussion is available at
# https://github.com/pypa/pip/issues/5696
#
# towncrier post 19.2 (unreleased as of this writing) adds a --config
# option that can be used instead of this file shuffling.
mv towncrier.pyproject.toml pyproject.toml
# towncrier 19.2 + works with python2.7