Instructions for updating package on PyPI.
See the following link for detailed instructions, though note that several steps are different.
https://packaging.python.org/tutorials/packaging-projects/#uploading-your-project-to-pypi
Follow the instructions below:
-
Delete old distributions in
dist/
andsrc/
. -
Upgrade packages
pip
,build
, andtwine
. -
Copy contents of
neuroHarmonize/
tosrc/neuroHarmonize/
.cp neuroHarmonize/* src/neuroHarmonize/
-
Move .setup.cfg to setup.cfg and move setup.py to .setup.py (this overrides setup.py).
mv .setup.cfg setup.cfg
mv setup.py .setup.py
-
Update version number in
setup.cfg
. -
Build the package.
python3 -m build
-
Upload the distribution. Note the username will be
__token__
and the password will be the API token from https://pypi.org.python3 -m twine upload dist/*
-
Finally (optional) discard all local changes in the repository to revert to developer state.
mv setup.cfg .setup.cfg
mv .setup.py setup.py