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

[Discussion] Native PyPi/Pip package support #833

Open
2 tasks done
iamthebot opened this issue Aug 21, 2024 · 1 comment
Open
2 tasks done

[Discussion] Native PyPi/Pip package support #833

iamthebot opened this issue Aug 21, 2024 · 1 comment

Comments

@iamthebot
Copy link
Contributor

iamthebot commented Aug 21, 2024

Checklist

  • I added a descriptive title
  • I searched open requests and couldn't find a duplicate

What is the idea?

Given the difficulty (and long term questions) about attempting to use uv's crates to provide pip interop... should some basic functionality around this be added to rattler?

Why is this needed?

Heterogenous environments with both pip and conda packages are unavoidable. Both users of rattler directly as well as pixi users would benefit from more "native" support for dealing with pip packages. The reason I believe this should go in rattler is that ultimately conda has basic pip_interop support and we can probably do even better inside rattler.

What should happen?

Specifically, functionality that would be relevant here would be:

Core Functionality

  • In a given prefix, identify which packages came from pypi (or another pypi-like index).
  • Objects that can represent installed pypi package metadata akin to how PrefixRecord does so for conda packages.
  • Uninstall a pip installed package (eg; if we need to do so prior to linking to replace it with a conda package).
  • Install a pip package

Nice To Have Functionality (These may be more complex or simply not in scope for rattler)

  • Enable using mappings like grayskull/prefix.dev for pypi:conda packages to suggest a conda package replacement given repodata for some channels.
  • Solving with pip packages.

Additional Context

No response

@baszalmstra
Copy link
Collaborator

I think this is a good idea! Note that https:/prefix-dev/rip already provides most of this functionality, perhaps we can port/extract some of that functionality here.

The mapping also seems like something we could provide as a rattler crate. Note that pixi has also been split into crates which we intent to start publishing. pypi_mapping currently provides the mapping functionality and doesn't depend on any uv crate so we could publish that to crates.io.

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

2 participants