-
Notifications
You must be signed in to change notification settings - Fork 124
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
Pixi global inject #342
Comments
This is a good idea! |
I'd be willing to work on this, would it be right to say if we want to have inject, then we essentially want That is, it'll find the project or init a project in ~/.pixi/envs as a bare pixi project repo (I mean bare as in the content of ... then behave exactly as if using project-type pixi for that project? With some new mappings for subcommands like
Does that make sense? I imagine once |
Mm, from my point of view global environments are indeed slimmed down pixi projects, but without a lot of the complexity of tasks, multiplatform, host/build dependencies and lock files. If you want that you're better of with a project. You can most likely reuse a lot of code but I would not quite treat them the same. |
I think implementing Things I'd like:
|
Another question on a use case is related to sharing the same tools. I haven't had the need to do this, but for example, Someone in my collaboration asks me how I use some tool that I've installed with Is this what we want for |
@YeungOnion If I understand your question correctly I think you're correct. We want to keep |
Okay, thanks @ruben-arts, I think that's better too. @dhirschfeld maybe postponing exposing binaries from dependencies installed vua For now, scope is to only expose binaries that are already exposed with |
I was pondering this today and had the thought, why make it so that only global can expose binaries? I'm taking some inspiration of the
Then # ~/xpublish-dev/pixi.toml
[pypi-dependencies]
xpublish_cli = {path = "./xpublish-cli", editable = true, expose_bins = true} Something like this would also help #1017 for where related subpackages also need to have their entry-points accessible. # ~/.pixi/envs/ansible/pixi.toml
[dependencies]
ansible = {version = "something", expose_bins = true}
ansible-core = {version = "something", expose_bins = true} |
I feel that auto expose into your global space from a project wouldn't fit the pixi project vision. Possibly with a command line addition to allow a user to do it themselves could make sense. |
I was thinking along those lines, but I wanted to avoid the what-ifs in that comment to not confuse the idea too much. A technique that I've seen to deal with this that I've liked is having a Say an # ~/xpublish-dev/pixi.toml
[pypi-dependencies]
xpublish_cli = {path = "./xpublish-cli", editable = true, expose_bins = true} Say, if you run WARN pixi::project: pixi.toml suggested exposing binaries and/or entry points from
`xpublish_cli` to your global environment.
Run `pixi install -expose-bins xpublish_cli` to add to your global environment. If the user decides to run # ~/xpublish-dev/pixi.local.toml
[pypi-dependencies]
xpublish_cli = {expose_bins = true} To avoid nagging the user, there could be an # ~/xpublish-dev/pixi.local.toml
[pypi-dependencies]
xpublish_cli = {expose_bins = false} |
Do binaries from a project need to be exposed globally? Wouldn't |
Problem description
When installing tools using
pixi global install
it is sometimes necessary to install additional packages in the same environment as the tool. For examplepixi global install visidata
will install visidata, but if we want to be able to inspect yaml files then we need pyyaml in the visidata environment too. With pipx, this is achieved usingpipx inject visidata pyyaml
. It would be great to have a similar command forpixi global
.Is there a current method to manually install a package inside a global tool environment? I tried manually activating the environment in ~/.pixi/envs/visidata but when I try using
mamba install pyyaml
I get the following error:The text was updated successfully, but these errors were encountered: