Refer to https://packaging.python.org/tutorials/packaging-projects/ for more filled out instructions
https://packaging.python.org/tutorials/packaging-projects/#creating-setup-py
Just take a look at setup.py and follow the instructions provided in the link.
In a nutshell:
- change version number in setup.py
- commit
- create a git tag with the appropriate version number (not necessary for the packaging but helps with development.)
- git push (make sure the tag gets pushed)
https://packaging.python.org/tutorials/packaging-projects/#generating-distribution-archives
- Run
python3 -m pip install --user --upgrade setuptools wheel
- From the root of this repository run
python3 setup.py sdist bdist_wheel
this should create adist
directory with relevant package components
https://packaging.python.org/tutorials/packaging-projects/#uploading-the-distribution-archives
- Run
python3 -m pip install --user --upgrade twine
- Run
python3 -m twine upload dist/*
this will prompt you for pypi creditials, input those and you should be set
- Create an account here https://pypi.org/
- Gain access to push here https://pypi.org/project/bridges/
zip -r bridges-python-VERSION.zip bridges/ setup.py