Skip to content

Commit

Permalink
Add support for cutting releases without DPL and using pep517.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Dec 13, 2018
1 parent 32b254d commit a8bca16
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 15 deletions.
19 changes: 7 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
21 changes: 21 additions & 0 deletions install-pip-master.py
Original file line number Diff line number Diff line change
@@ -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()
3 changes: 0 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
[aliases]
dists = clean --all sdist bdist_wheel

[bdist_wheel]
universal = 1

Expand Down
15 changes: 15 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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/*

0 comments on commit a8bca16

Please # to comment.