Feature request: ability to install executables into a specific directory
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
Direzione di ricerca
Start with pkgx's command-line option handling, the documented virtual-environment behavior, and the cache behavior referenced in the issue. Define how --install-dir should append or recreate contents, handle cached executables and multi-file packages, and preserve the requested Windows use case. Done means the command places selected package contents in the custom directory without deleting existing files and can reuse the regular cache.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
I want to create my own virtual environment, but not using this method: https://docs.pkgx.sh/pkgx/pkgx#virtual-environments
Instead, I would like pkgx to gather all the selected packages and install them into a custom location, as a flat list of files. I would use this specifically for single-file executables.
I would imagine doing something like this: pkgx --install-dir "some-location" gum glow hx@123
An ls of some-location would produce:
> ls some-location
gum
glow
hx
I would then do:
export PATH=some-location:$PATH
gum --version
glow --version
hx --version
I would expect this method to download the tools to the regular pkgx cache location, and that install-dir would just copy (or link) the binaries to some-location. If I re-run the command, it should see that the binaries are already available in the cache, and then just re-copy/re-link them (if needed).
I wouldn't want the command to delete existing contents in some-location, but instead, it should append to some-location:
> ls some-location
(empty)
> pkgx --install-dir some-location gum
> ls some-location
gum
> pkgx --install-dir some-location glow
> ls some-location
gum
glow
Additional flags could be added that could request a recreate of some-location, instead of an append.
I wouldn't use this feature for packages that consist of multiple files, but if someone chooses to do so, I would expect the contents of that package to be copied into some-location.
I am already doing something like this manually using ubi, since a long Path environment variable on Windows becomes problematic. This is to overcome the following issue I am having with Mise: https://github.com/jdx/mise/discussions/5830
Seeing how the + syntax sets the Path (https://docs.pkgx.sh/appendix/faq#where-do-you-put-pkgs), it is clear that long fully-qualified locations are preferred by pkgx, which will surely cause similar issues on Windows as it does for Mise. Having the ability to copy the tools into some-location so that we can control our own Path, would be very helpful.
Similar functionality exists in aqua: https://aquaproj.github.io/docs/guides/build-container-image/#notes-of-aqua-cp
- Lingua principale
- Rust
- Stelle
- 9.9k
- Fork
- 1.4k
- Merge medio
- 1g 17h
- PR unite (30g)
- 1
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di pkgxdev/pkgx
-
`--query` flag gone Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
-
`pkgx --update` Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 52/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
Tutte le issue di pkgxdev/pkgx
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
state:needs triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
zed-industries/zed#64680 · 2 commenti ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
RustPython/RustPython#8802 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
TheLarkInn/aipm#2390 ·