Closed sparfenyuk closed 1 year ago
Note: I ran pypiserver instead, pointing it to the location with mirrored packages, and pip install
worked.
Looks like pip
croaks when Morgan serves metadata files with the project name having different casing than what was given to pip
. I guess I'll have to modify the metadata file before serving in this case. Working on it.
Hmm, pip
actually is sending the project name normalized (i.e. lowercased and underscores replaced with dashes), so Morgan isn't getting the actual name asked of pip
. Looks like my only way to solve this is not to serve metadata files at all (if I disable them, it works). I'll have to think about it, because I don't want to lose that feature. If you ask pip
for the normalized name (pip install fastapi
) it works correctly. Maybe I'll add a command line flag to disable metadata files if you really want to use non-normalized names.
I've released version 0.13.0 with a new --no-metadata
flag that disables serving metadata files altogether. This works around the issue. I'll have to contact pip
developers to understand why it behaves like that.
Steps to reproduce:
morgan.ini
:morgan mirror
morgan serve
pip install FastAPI --index-url http://localhost:8080
Expected: the package installed successfully. What happens instead: failure