I am storing distributable wheel packages from several modules in a private GitHub repository. Here is the repository structure:
myrepo\
| module1\
| | pyproject.toml
| | src\
| | | *.py
| | dist\
| | module1.whl
| module2\
| pyproject.toml
| src\
| | *.py
| dist\
| module2.whl
Currently, I'm installing them using the pip
tool from the source, which works. But, each time it clones the whole repository and builds the package locally.
pip install ssh+git://git@github.com/myorg/myrepo.git#subdirectory=module1
Is there a way to tell pip to only download and install the module1.whl
and module2.whl
files and not the whole repository?
I've tried the below approaches so far, but none of them works:
pip install ssh+git://git@github.com/myorg/myrepo.git#subdirectory=module1/dist/module1-0.1.0-py3-none-any.whl
and
pip install https://github.com/myorg/myrepo/blob/main/module1/dist/module1-0.1.0-py3-none-any.whl
I've already checked existing questions like Is it possible to use pip to install a package from a private github repository? and Distributing my python module inside organization, but none of them describe this use case.
Edited
This is already possible for Public repositories like, so it is not something strange:
pip install https://github.com/numpy/numpy/releases/download/vx.y.z/numpy-x.y.z.tar.gz