Skip to content

Commit

Permalink
Add PYPI_README.md for instructions on releasing to pypi
Browse files Browse the repository at this point in the history
  • Loading branch information
dannyroberts committed Mar 7, 2020
1 parent a40e2bd commit 6f31736
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions PYPI_README.md
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/*
```

0 comments on commit 6f31736

Please sign in to comment.