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

Support --expose in non-global environments #2687

Open
gjoseph92 opened this issue Dec 10, 2024 · 0 comments
Open

Support --expose in non-global environments #2687

gjoseph92 opened this issue Dec 10, 2024 · 0 comments

Comments

@gjoseph92
Copy link

Problem description

The --expose feature in the new pixi global implementation is very helpful. Specifically, it's really useful to be able to install multiple Python interpreters side-by-side: #833.

However, I'd like to be able to do the same thing in a normal environment. I'm not exactly sure what the syntax would be yet, but I could imagine having multiple features with different versions of the same package, then one environment combining them. Maybe each feature would define the aliases to expose certain packages under, or you could provide a mapping in the environment definition.

I'm aware this is really an ask about support for installing and solving for multiple versions of the same package in one environment. Given that the --expose feature exists now though for global environments, maybe that can motivate generalizing it.

Let me give a very specific use case of why I'm wanting this:

I'm working on a large codebase that currently uses Poetry, with services that require different versions of Python. Currently Python (and other things) are installed with brew/pyenv/apt/etc; I'd like to switch to using pixi to manage the system-level dependencies. Because Poetry just expects python3.10, python3.11, etc. to be on the $PATH, I need multiple versions of Python installed side-by-side for it to find. I can make separate pixi envs for each version, and rig up a script to parse the pyproject.toml and activate the right env prior to running Poetry, but it's very brittle. For now, I've actually switched to devbox because it allows me to install [email protected], [email protected] in the same environment, but I'd prefer to use pixi for this.

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

1 participant