Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jaimergp opened this issue May 22, 2024 · 5 comments
Open

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

jaimergp opened this issue May 22, 2024 · 5 comments

Comments

@jaimergp
Copy link
Member

jaimergp commented May 22, 2024

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:

  • More integration in the conda environment (proper conda-meta/ files, clobbering detection, taken into account in the solves, etc).
  • A mature project that has gone through the usual edge cases already so it should be more robust than this early attempt

Cons:

  • One more dependency
  • Delegated complexity to a 3rd party
  • We could be introducing problems in the solves
@dholth
Copy link
Contributor

dholth commented Jul 16, 2024

I am also interested in this idea n.b. conda/grayskull#541 and conda/conda-build#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
Copy link
Member Author

jaimergp commented Jul 16, 2024

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
Copy link
Contributor

dholth commented Jul 16, 2024

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

@jaimergp
Copy link
Member Author

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?

@jjhelmus
Copy link

jjhelmus commented Dec 2, 2024

What about creating an entry in the environment's conda-meta directory for each pip installed package? The information for the file can likely be derived from the METADATA file in the dist-info directory of the pip installed package with a bit of conversion.

The benefit of this approach is that conda would then be able to manage these packages directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants