Skip to content

Commit

Permalink
Merge pull request #83 from merretbuurman/devel
Browse files Browse the repository at this point in the history
Added instructions on how to upload to pypi.
themiszamani authored Nov 25, 2022
2 parents 4fcbc1d + ba22ab7 commit d17c31c
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions pypi-instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Instructions on uploading pyhandle releases to pypi

(Merret, 2022-07-21)

## Preparations:

1. Install twine: `pip install twine`
2. Create a pypirc file in your home dir: `vi ~/.pypirc` (see example below)
3. Login to pypi / test-pypi and create an API key to use for authentication,
add that API key to the .pypirc file.


## To upload a release:

1. Make sure you are on master and master is up to date.

2. Go to the directory where the `setup.py` file is located.

3. Remove the previous builds: `rm dist/pyhandle-x.y.z.tar.gz`

4. Build the next build: `python setup.py sdist`

5. Check with twine: `twine check dist/*`

6. Upload with twine: `twine upload --repository pypi dist/*`


## Example .pypirc file:

```
[distutils]
index-servers =
pypi
testpypi
[pypi]
repository = https://upload.pypi.org/legacy/
username = __token__
password = pypi-Jhdsfjksdfk... (api key)
[testpypi]
repository = https://test.pypi.org/legacy/
username = __token__
password = pypi-KsdkfKJHksjdhfkjsdf... (api key)
```

0 comments on commit d17c31c

Please sign in to comment.