zuzukin / whl2conda

Generate conda package from pure python wheel
https://zuzukin.github.io/whl2conda/
Apache License 2.0
6 stars 1 forks source link

Implicit support for known renames #11

Closed analog-cbarber closed 10 months ago

analog-cbarber commented 10 months ago

Support renames for common packages whose names are known to differ between pip/conda, e.g.

pyqt5 -> pyqt
antler4-python3-runtime -> antlr-python-runtime
torch -> pytorch
numpy-quaternion -> quaternion
opencv-python -> opencv
tables -> pytables
analog-cbarber commented 10 months ago

Is there some automated way to discover what other packages should be in the list?

analog-cbarber commented 10 months ago

It turns out there is a list of known renames that are autodiscovered by the conda-forge bot:

https://github.com/regro/cf-graph-countyfair/tree/master/mappings/pypi

There is also a manually maintained static list:

https://github.com/regro/cf-scripts/blob/master/conda_forge_tick/pypi_name_mapping_static.yaml

We should use those.

I don't see the antlr-python-runtime in the lists but everything else is there.

analog-cbarber commented 10 months ago

The name-mapping.json file contains what we need.

The question is how to use this:

Seems like including the file in this project would be the only way for this to work offline or if there are problems connecting with the repo. It would also allow us to prune the table of the majority of entries in which the name is not changed.

So I think we should implement static for the initial release and then the auto update version if not too difficult otherwise the manual update.

analog-cbarber commented 10 months ago

Also seems like there is now a antlr4-python3-runtime on conda-forge so that rename is no longer necessary.