I want to create a local repository server for pypi.
I tried it because it seems to be easy to make with a package called pypiserver
.
pypiserver
I tried it on CentOS7.
# pip install pypiserver
# mkdir ~/pypi_pkg
# nohup pypi-server -p 8080 ~/pypi_pkg &
Now, if you put the package file in tar
or .whl
in the ~ / pypi_pkg
directory, you can publish it athttp: // <ipaddress>: 8080 / simple /
.
Even if you put multiple versions in the directory, it will be published like pypi.
Of course, it can also be run on other WSGI servers such as gunicorn and Apache.
When using
If it is not https, an error will occur, so add the --trusted-host
option.
# pip install --trusted-host <ipaddress> --extra-index-url http://<ipaddress>:8080/simple/ <package_name>
# pip install --trusted-host <ipaddress> --index-url http://<ipaddress>:8080/simple/ <package_name>
According to the documentation, you can also upload and operate packages. (unconfirmed)
Recommended Posts