You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildstream.apache.org by tv...@apache.org on 2022/04/13 07:56:09 UTC

[buildstream] 01/01: tox.ini: Add convenience hook for publishing releases

This is an automated email from the ASF dual-hosted git repository.

tvb pushed a commit to branch tristan/add-tox-release
in repository https://gitbox.apache.org/repos/asf/buildstream.git

commit 819c6e769abb1cc89ef877973e0314d7ee26bbd4
Author: Tristan van Berkom <tr...@codethink.co.uk>
AuthorDate: Wed Apr 13 16:55:11 2022 +0900

    tox.ini: Add convenience hook for publishing releases
    
    Because I always forget how to do this and end up asking Chandan, now
    I should be able to remember how to do this.
---
 tox.ini | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/tox.ini b/tox.ini
index 2c80db4b4..cf21f8eea 100644
--- a/tox.ini
+++ b/tox.ini
@@ -203,6 +203,28 @@ deps =
     click-man >= 0.3.0
     -rrequirements/requirements.txt
 
+
+#
+# Publish a release on PyPI.
+#
+# This can be run manually but is useful to have here just to document how it's done,
+# it's also easier to just run:
+#
+#   TWINE_USERNAME=buildstream TWINE_PASSWORD=<password> tox -e release
+#
+[testenv:release]
+skip_install = true
+commands =
+    python3 setup.py sdist bdist_wheel
+    twine upload -r pypi dist/*
+deps =
+    twine
+    wheel
+passenv =
+    TWINE_USERNAME
+    TWINE_PASSWORD
+
+
 #
 # Usefull for running arbitrary scripts in a BuildStream virtual env
 #