Publish Library
Chester Wyke September 14, 2022 Updated: April 26, 2025 #PythonEditable Install (Local Project Install)
Allows you to run the library before publishing it for external or use case testing.
Sources:
- https://stackoverflow.com/questions/23075397/python-how-to-edit-an-installed-package
- https://pip.pypa.io/en/stable/topics/local-project-installs/#editable-installs
Run from local path source
pip install -e path/to/SomeProjectRun from git source
pip install -e git+https://github.com/c-git/opylib.git#egg=opylibPublish 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 buildtwine upload dist/opylib-x.x.x*Upload all
python3 -m build
twine upload dist/*Initial 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