-
Notifications
You must be signed in to change notification settings - Fork 16
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 #160 from boeddeker/master
prepare for pypi
- Loading branch information
Showing
4 changed files
with
63 additions
and
5 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
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,50 @@ | ||
|
||
# PyPi upload | ||
|
||
Package a Python Package/ version bump See: https://packaging.python.org/tutorials/packaging-projects/ | ||
|
||
1. Update `setup.py` to new version number | ||
2. Commit this change | ||
3. Tag and upload | ||
|
||
## pypirc | ||
|
||
Example `~/.pypirc` (see https://packaging.python.org/en/latest/specifications/pypirc/) | ||
``` | ||
[distutils] | ||
index-servers = | ||
pypi | ||
testpypi | ||
[pypi] | ||
username = __token__ | ||
password = <PyPI token> | ||
[testpypi] | ||
username = __token__ | ||
password = <TestPyPI token> | ||
``` | ||
|
||
## Install dependencies: | ||
```bash | ||
pip install --upgrade setuptools | ||
pip install --upgrade wheel | ||
pip install --upgrade twine | ||
# pip install --upgrade bleach html5lib # some versions do not work | ||
pip install --upgrade bump2version | ||
``` | ||
|
||
`bump2version` takes care to increase the version number, create the commit and tag. | ||
|
||
|
||
## Publish | ||
|
||
```bash | ||
bump2version --verbose --tag patch # major, minor or patch | ||
python setup.py sdist # bdist_wheel # It is difficult to get bdist_wheel working with binary files | ||
git push origin --tags | ||
# Wait for the github action to build the windows wheels, ToDO: Fix wheels. | ||
twine upload --repository testpypi dist/* # | ||
twine upload dist/* | ||
git push | ||
``` |
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,2 @@ | ||
[build-system] | ||
requires = ["setuptools", "wheel", "Cython", "numpy", "scipy"] |
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