- python
- detox (pip)
- pyenv (AUR)
- virtualenvwrapper (pacman)
- setuptools (optional)
- pandoc (pacman)
- twine (pacman)
- Install multiple python version for testing by using pyenv
- Create ~/.pypirc
[distutils]
index-servers =
pypi
pypitest
[pypi]
repository: https://upload.pypi.org/legacy/
username: NearHuscarl
password: <password>
[pypitest]
repository: https://testpypi.python.org/pypi
username: NearHuscarl
password: <password>
- Project structure
+ repo/
* setup.cfg
* setup.py
* tox.ini
* LICENSE.md
* README.md
+ package/
* __init__.py
* module1.py
* module2.py
+ test/
* test_1.py
...
-
Use
pandoc
convert fromREADME.md
toREADME.rst
-
Reread document
-
Create setup.py like this
-
Generate package
$ python setup.py sdist bdist_wheel
- pip install and check package
$ mktmpenv
$ pip install dist/*.whl
$ # do stuff
$ deactivate
- Run test on multiple python versions
$ tox
- Commit
$ git commit
- Bump version
patch
minor
ormajor
$ bumpversion patch
- Upload package
$ twine upload dist/* -r pypitest
$ # check if everything works on test server
$ twine upload dist/*
- Upload to github
git push --tags
http://blog.pinaxproject.com/2015/12/08/how-test-against-multiple-python-versions-parallel/
http://python-packaging.readthedocs.io/en/latest/metadata.html
https://www.codementor.io/arpitbhayani/host-your-python-package-using-github-on-pypi-du107t7ku
It's really easy if are you using special tool for publications.
It's works in your browser, without any special dependencies.
Try this library for that https://github.com/markolofsen/how_to_upload_package_to_pypi