summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2018-12-12 17:08:36 -0500
committerJason R. Coombs <jaraco@jaraco.com>2018-12-12 19:19:18 -0500
commita8bca166266fa2eeab931f6f20eef8e50048dddf (patch)
tree6c1ad883eaf4ad0b79fd56fe327bf8d041fa65f2
parent32b254dee01b5ef2b695ae04889af482c6cb28c3 (diff)
downloadpytest-runner-a8bca166266fa2eeab931f6f20eef8e50048dddf.tar.gz
Add support for cutting releases without DPL and using pep517.
-rw-r--r--.travis.yml19
-rw-r--r--install-pip-master.py21
-rw-r--r--setup.cfg3
-rw-r--r--tox.ini15
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()
diff --git a/setup.cfg b/setup.cfg
index 30f3c08..726b307 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,6 +1,3 @@
-[aliases]
-dists = clean --all sdist bdist_wheel
-
[bdist_wheel]
universal = 1
diff --git a/tox.ini b/tox.ini
index 4121a91..853d7de 100644
--- a/tox.ini
+++ b/tox.ini
@@ -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/*