From 6f31736dd6c71c3da592f71969b5f5f03e302819 Mon Sep 17 00:00:00 2001 From: Daniel Roberts Date: Sat, 7 Mar 2020 17:58:44 -0600 Subject: [PATCH] Add PYPI_README.md for instructions on releasing to pypi --- PYPI_README.md | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 PYPI_README.md diff --git a/PYPI_README.md b/PYPI_README.md new file mode 100644 index 0000000..afc3891 --- /dev/null +++ b/PYPI_README.md @@ -0,0 +1,55 @@ +# Releasing on PyPI + +We follow something along the lines of the 2017 version of +https://hynek.me/articles/sharing-your-labor-of-love-pypi-quick-and-dirty/. + + +## One-time setup + +### .pypirc +Make sure your `~/.pypirc` is set up like this + +```bash +[distutils] +index-servers= + pypi + test + +[test] +repository = https://test.pypi.org/legacy/ +username = + +[pypi] +username = __token__ +``` + +### pip installs + +```bash +pip install twine -U +``` + +## Build +```bash +rm -rf build dist +python setup.py sdist bdist_wheel +``` + +## Push to PyPI staging server + +```bash +twine upload -r test --sign dist/* +``` + +In a different virtualenv, test that you can install it: + +```bash +pip install -i https://testpypi.python.org/pypi jsonobject-couchdbkit --upgrade +``` + + +## Push to PyPI + +```bash +twine upload -r pypi --sign dist/* +```