-
Notifications
You must be signed in to change notification settings - Fork 4
Deploy a new release in PyPi
First, be sure that the name of your package does not exist on Pypi. You have to choose a unique name otherwise, you won't be able to upload your package on Pypi.
You can find help here
Create a Pypi account and TestPyPi account. If other collaborators want to build a Pypi package, you will need to add them as contributors on this project in TestPyPi and Pypi.
Update the tools needed: setuptools and twine
pip install setuptools --upgrade
pip install twine --upgrade
- New version name
- Update dependencies
- Update contact information
Go to directory where you package is (could be bambird or something else like bambird.git)
python setup.py clean
python setup.py sdist bdist_wheel
more info -> https://packaging.python.org/tutorials/packaging-projects/#generating-distribution-archives
python -m twine upload --repository-url https://test.pypi.org/legacy/ dist/*
The easiest option is to open a new notebook on a Google Colab session. Then, install bambird from the TestPyPi using this command Don't forget to add the argument --extra-index-url https://pypi.org/simple/ in order to be able to install the other packages that are required to run scikit-maad
!pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ bambird==<version>
or create a new virtual environment. For instance, with conda:
conda create --name test_bambird
conda activate test_bambird
conda install pip
pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ bambird==<version>
conda list
For those using Spyder, it might be necessary to install the package spyder-kernels
conda install spyder-kernels=2.3
You can delete the test environment when everything is correct with the command
conda deactivate
conda env remove -n test_bambird
Take your time to verify the examples and make tests to be sure that the new version is running correctly.
twine upload dist/*