conda-incubator / conda-pypi

Better PyPI interoperability for the conda ecosystem
https://conda-incubator.github.io/conda-pypi/
MIT License
12 stars 1 forks source link

Convert to `.conda` as part of the `pip install`? #28

Open jaimergp opened 3 months ago

jaimergp commented 3 months ago

Wondering if there's a net positive in using whl2conda for this. The rough logic would be to:

  1. Run the dependency analysis to get the conda and PyPI packages as we are doing now.
  2. Instead of running pip install --no-deps ... directly, convert to .conda beforehand with whl2conda and then install that with conda --no-deps.
  3. We would cache these converted wheels in the pkgs cache as usual.

Benefits:

Cons:

dholth commented 1 month ago

I am also interested in this idea n.b. https://github.com/conda/grayskull/pull/541 and https://github.com/conda/conda-build/pull/5380

Do we also have a way to install without leaving a copy in the package cache, in case we generate a confusing number of them or have ephemeral "make a single local project editable" wheels?

jaimergp commented 1 month ago

I guess we would only cache the stuff that comes from PyPI, not the editable installs or dynamic references from Github. conda clean would take care of removing the unnecessary stuff too.

dholth commented 1 month ago

Can conda install a .conda without leaving it in pkgs/cache?

jaimergp commented 1 month ago

I don't think there's an option for that. We would have to inject a temporary location for the pkgs_dirs setting and maybe discard it afterwards?