This repository was archived by the owner on Aug 16, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Uploading a new version to PyPi
Pepe Mandioca edited this page Mar 14, 2019
·
4 revisions
- Create a venv with packages
twine
andwheel
installed - Prepare the new version and upload it to Testing PyPi:
- Choose a new version for the package. Use semantic versioning as a guideline for the versioning scheme. Call this $VERSION.
- Change the
version
field insetup.py
to $VERSION. - Change the
__version__
variable in__init__.py
- Run python setup.py sdist bdist_wheel
- Upload the package to the Test PyPi repositor:
twine upload --repository-url https://test.pypi.org/simple/ dist/*
- Check that the TestPyPi version installs correctly:
- Switch to a new terminal instance
- Create a new venv and activate it
pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple sldatasets
- Upload the package to the Main PyPi repositor:
twine upload --repository-url https://test.pypi.org/simple/ dist/*
- Check that the MainPyPi version installs correctly:
- Switch to a new terminal instance
- Create a new venv and activate it
pip install sldatasets
python -c 'import sldatasets as sld; sld.get("lsa64)'
- Clean up
- Delete build, dist and sldatasets.egg-info folders