JeanChristopheMorinPerso / rez-pip

PyPI/python package ingester/converter for the rez package manager
https://rez-pip.readthedocs.io/en/latest/
Apache License 2.0
23 stars 5 forks source link

Package names inconsistent between requirements and installed packages #55

Open JeanChristopheMorinPerso opened 11 months ago

JeanChristopheMorinPerso commented 11 months ago

See https://github.com/AcademySoftwareFoundation/rez/issues/1545.

Basically, there is an inconsistency between the packages we install, and the packages that we put in the requirements. On top of the issue reported in the linked issue, the new rez-pip also has problems with uppercased vs lowercased packages.

Package name canonization is annoying... https://blog.piwheels.org/canonicalise-all-the-things/.

We can fix this issue by changing https://github.com/JeanChristopheMorinPerso/rez-pip/blob/9c61a5d2420c3e2da2fc3e8dddc85d9de1e83f75/src/rez_pip/utils.py#L39 to always lower-case the name and also replace . with _.

To confirm that it really works, we can run REZ_PACKAGES_PATH=~/rez_packages rez-pip2 prefect==2.13.6 -p /tmp/asd --python-version 3.9 -- -v and then rez-env prefect and it should work.

We might want to also print a report at the end with a mapping between the original names and the new names if it's possible to do. We might also want to harmonize the names across the logs.

MrLixm commented 8 months ago

Hello ! I think I just ran in the issue when trying to install sphinx==7.2.6.

$ rez env sphinx furo
12:40:45 ERROR    PackageFamilyNotFoundError: package family not found: sphinx (searched: C:\Users\lcoll\rez\packages; N:\packages; Z:\rez\packages)
$ rez env Sphinx furo
12:40:56 ERROR    PackageFamilyNotFoundError: package family not found: babel, was required by: Sphinx (searched: C:\Users\lcoll\rez\packages; N:\packages; Z:\rez\packages)

Is the corresponding PR for that issue considered done ? Or any help needed to get it merge ? Cheers.