38 lines
910 B
Markdown
38 lines
910 B
Markdown
# pip archive creation
|
|
HOWTO create and upload an archive to PyPI (pip).
|
|
|
|
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.
|
|
|
|
```
|
|
# Install dependencies
|
|
python3 -m pip install --user --upgrade setuptools wheel twine
|
|
|
|
# Remove old build
|
|
rm -rf build dist karoo_gp_*.egg-info
|
|
|
|
# Create Archive
|
|
python3 setup.py sdist bdist_wheel
|
|
|
|
# Upload to Test Archive
|
|
python3 -m twine upload --repository-url https://test.pypi.org/legacy/ dist/*
|
|
|
|
# Check Test Archive
|
|
https://test.pypi.org/project/karoo_gp-jebba
|
|
|
|
# Install Test Archive
|
|
python3 -m pip install --index-url https://test.pypi.org/simple/ --no-deps karoo_gp-jebba
|
|
|
|
# Upload to Main Archive
|
|
python3 -m twine upload dist/*
|
|
|
|
# Install Main Archive
|
|
python3 -m pip install karoo_gp-jebba
|
|
```
|
|
|