Publish Library

Chester Wyke September 14, 2022 Updated: April 15, 2025 #python

Editable Install (Local Project Install)

Allows you to run the library before publishing it for external or use case testing.

Sources:

Run from local path source

pip install -e path/to/SomeProject

Run from git source

pip install -e git+https://github.com/c-git/opylib.git#egg=opylib

Publish a version

Source: https://packaging.python.org/en/latest/tutorials/packaging-projects/

Upload specific version

Replace x.x.x with the version number e.g. 1.0.0

python3 -m build
twine upload dist/opylib-x.x.x*

Upload all

python3 -m build
twine upload dist/*

Initial Setup Setup for Publishing

Last command appears to be python version specific. Got it from an error message generated when I tried to use build.

python3 -m pip install --upgrade pip
python3 -m pip install --upgrade build
python3 -m pip install --upgrade twine
sudo apt install python3.10-venv