local pypi server for development installations
based on private-pypi
to start the local-pypi server on your development machine, execute the run.sh
script:
./run.sh
to use the local pypi server as your local repo:
set your PIP_INDEX_URL
in the .env
file to this:
PIP_INDEX_URL=http://local-pypi:some_password@localhost:8888/simple/
To login to the admin interface and browse packages, simply open the PIP_INDEX_URL above in your browser!
to add additional packages to the local repo use the add_package.sh helper script. This script requires you have the twine
utility available. To install twine run:
pip3 install twine
to add a package to your repo, you must build the package as a SOURCE distribution. The resulting file will have a .tar.gz
extension:
cd /path/to/your/project/root;
python3 setup.py sdist;
# to show your archive file
ls dist/
to push the source package to your pypi:
./add_package.sh /Users/jungwirth/src/person-pipeline/dist/person-pipeline-2.1.3.tar.gz
Introductory video with detailed usage instructions:
For local-pypi without docker
pip install private-pypi==0.2.0
Clone project to your local directory - develop branch
cd/to/local-pypi/
local-pypi$ private_pypi server $PWD/packages --config=$PWD/config/config.toml
To remove a package named <base-package-name>
from the repo:
- ensure your git repo is checked out to a feature branch (not
develop
or a release branch) - ensure the
local-pypi
server is not running - delete the package and its metadata file:
packages/cache/local-pypi/storage/<base-package-name>/<base-package-name>-X.X.X.tar.gz
packages/cache/local-pypi/storage/<base-package-name>/<base-package-name>-X.X.X.tar.gz.meta
- start the server. The server reconciles the index.toml file with the storage directory tree on start-up
- stop the server and commit the changes to your branch
You can delete multiple packages at once.
to edit the index manually, edit this file:
packages/cache/local-pypi/storage/index.toml
index/local-pypi/index.toml
is over-written with the cache version at start-up.