diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2018-12-12 17:08:36 -0500 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2018-12-12 19:19:18 -0500 |
commit | a8bca166266fa2eeab931f6f20eef8e50048dddf (patch) | |
tree | 6c1ad883eaf4ad0b79fd56fe327bf8d041fa65f2 | |
parent | 32b254dee01b5ef2b695ae04889af482c6cb28c3 (diff) | |
download | pytest-runner-a8bca166266fa2eeab931f6f20eef8e50048dddf.tar.gz |
Add support for cutting releases without DPL and using pep517.
-rw-r--r-- | .travis.yml | 19 | ||||
-rw-r--r-- | install-pip-master.py | 21 | ||||
-rw-r--r-- | setup.cfg | 3 | ||||
-rw-r--r-- | tox.ini | 15 |
4 files changed, 43 insertions, 15 deletions
diff --git a/.travis.yml b/.travis.yml index b54e8e5..1636305 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,18 +13,13 @@ jobs: - stage: deploy if: tag IS present python: *latest_py3 - install: skip - script: skip - deploy: - provider: pypi - on: - tags: true - all_branches: true - user: jaraco - password: - secure: ... # encrypt password with `travis encrypt` - distributions: dists - skip_cleanup: true + before_script: skip + env: + - TWINE_USERNAME=jaraco + # TWINE_PASSWORD + - secure: ... # encrypt `TWINE_PASSWORD="{password}"` with `travis encrypt` + - TOX_TESTENV_PASSENV="TWINE_USERNAME TWINE_PASSWORD" + script: tox -e release cache: pip diff --git a/install-pip-master.py b/install-pip-master.py new file mode 100644 index 0000000..d62d20f --- /dev/null +++ b/install-pip-master.py @@ -0,0 +1,21 @@ +""" +In order to support installation of pep517 from source, +pip from master must be installed. +""" + +import subprocess +import sys + + +def main(): + cmd = [ + sys.executable, + '-m', 'pip', 'install', + 'git+https://github.com/pypa/pip', + ] + subprocess.run(cmd) + cmd[-1:] = sys.argv[1:] + subprocess.run(cmd) + + +__name__ == '__main__' and main() @@ -1,6 +1,3 @@ -[aliases] -dists = clean --all sdist bdist_wheel - [bdist_wheel] universal = 1 @@ -17,3 +17,18 @@ extras = changedir = docs commands = python -m sphinx . {toxinidir}/build/html + +[testenv:release] +skip_install = True +# workaround for pep517 build support +install_command = python install-pip-master.py {opts} {packages} +deps = + # pull from feature branch for feature + git+https://github.com/pypa/pep517@feature/build-command + # workaround for https://github.com/pypa/twine/issues/423 + git+https://github.com/pypa/twine + path.py +commands = + python -c "import path; path.Path('dist').rmtree_p()" + python -m pep517.build . + python -m twine upload dist/* |