2020-02-22 11:51:53 -07:00
|
|
|
# pip archive creation
|
|
|
|
HOWTO create and upload an archive to PyPI (pip).
|
|
|
|
|
2020-02-22 11:55:09 -07:00
|
|
|
Create accounts on the main PyPI server and the Test PyPI server:
|
|
|
|
|
|
|
|
* https://pypi.org/account/register/
|
|
|
|
|
|
|
|
* https://test.pypi.org/account/register/
|
|
|
|
|
|
|
|
Then run commands like this, changing the username "jebba" to your username.
|
|
|
|
|
2020-02-22 11:51:53 -07:00
|
|
|
```
|
|
|
|
# Install dependencies
|
|
|
|
python3 -m pip install --user --upgrade setuptools wheel twine
|
2020-02-23 17:25:37 -07:00
|
|
|
|
|
|
|
# Remove old build
|
|
|
|
rm -rf build dist karoo_gp_*.egg-info
|
|
|
|
|
2020-02-22 11:51:53 -07:00
|
|
|
# Create Archive
|
|
|
|
python3 setup.py sdist bdist_wheel
|
2020-02-23 17:25:37 -07:00
|
|
|
|
2020-02-22 11:51:53 -07:00
|
|
|
# Upload to Test Archive
|
|
|
|
python3 -m twine upload --repository-url https://test.pypi.org/legacy/ dist/*
|
2020-02-23 17:25:37 -07:00
|
|
|
|
2020-02-22 11:51:53 -07:00
|
|
|
# Check Test Archive
|
|
|
|
https://test.pypi.org/project/karoo_gp-jebba
|
2020-02-23 17:25:37 -07:00
|
|
|
|
2020-02-22 11:51:53 -07:00
|
|
|
# Install Test Archive
|
|
|
|
python3 -m pip install --index-url https://test.pypi.org/simple/ --no-deps karoo_gp-jebba
|
2020-02-23 17:25:37 -07:00
|
|
|
|
2020-02-22 11:51:53 -07:00
|
|
|
# Upload to Main Archive
|
|
|
|
python3 -m twine upload dist/*
|
2020-02-23 17:25:37 -07:00
|
|
|
|
2020-02-22 11:51:53 -07:00
|
|
|
# Install Main Archive
|
|
|
|
python3 -m pip install karoo_gp-jebba
|
|
|
|
```
|
|
|
|
|