-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #78 from dimagi/dmr/add-PYPI-README
Add PYPI_README.md for instructions on releasing to pypi
- Loading branch information
Showing
1 changed file
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 = <your test user name goes here> | ||
|
||
[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/* | ||
``` |