Unify installer scripts
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 25/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Da chiarire
- Stato di attività
- Ferma
- Ambito
- build-system, release
Direzione di ricerca
Inizia facendo l’inventario degli script di installazione NSIS, .sh singolo e .pkg esistenti, quindi leggi la issue #646 relativa alla modifica NSIS pianificata. Confronta le opzioni Shell e Python rispetto al bootstrap in Windows, ai runtime inclusi, alla pulizia del registro e alle problematiche legate agli anti-malware. Il lavoro è completato quando è stata decisa una direzione di implementazione ed esiste un piano concreto per unificare la logica di installazione condivisa mantenendo piccoli launcher specifici per piattaforma.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Checklist
- I added a descriptive title
- I searched open requests and couldn't find a duplicate
What is the idea?
Constructor's install and uninstall scripts currently exist in 3 versions:
- NSIS script, for the .exe installer
- A single .sh script, for the .sh installer
- A number of separate .sh scripts, for the .pkg installer. These are similar to the single .sh script, but not identical.
Most changes to the installation process must therefore be implemented 3 times.
Since the existing NSIS script will have to be completely rewritten anyway when Constructor moves off NSIS (#646), it’s worth considering whether this is an opportunity to unify all 3 scripts into a single codebase, which would reduce the amount of duplicate maintenance work in the future.
What should happen?
There are two plausible options for which language a unified script could be written in:
Shell script:
-
Would allow us to reuse the existing scripts from the .sh and .pkg formats, which are complete and battle-tested.
-
The main issue is that Windows doesn't come with a Unix-like shell, so a shell executable would need to be bundled with the installer. This doesn't necessarily need to be Bash, since the existing script is already POSIX-compatible, and is verified as such using Shellcheck. A minimal, self-contained POSIX shell such as Dash is probably a better option.
-
Windows would also require implementations of external Unix commands such as
rmandcp. Something along the lines of BusyBox is probably the easiest way to provide these. Care would need to be taken to avoid using any versions of these commands which are already on the PATH of the target machine.
Python:
-
Much easier to write secure and reliable code.
-
Would require the installer to bundle a Python interpreter on all platforms. This is already present in installers which use conda-standalone, but not those that use micromamba.
- However, conda-standalone is already a requirement for most Windows installers, since micromamba doesn't support menuinst.
- @jaimergp also mentioned that a Python script is already used for some registry cleanup in the Windows uninstaller, because implementing it in NSIS was too difficult. This requires Python to be in the base environment even if it isn't used for anything else.
-
PyInstaller works well on all platforms, and allows us to use a Python build installed by conda from a trusted channel.
- The install script could be run either:
- Via the existing conda-standalone executable (
conda.exe python); or - Via a new PyInstaller executable containing the current conda-standalone functionality plus anything else needed.
- Via the existing conda-standalone executable (
- PyInstaller's main downside is slow startup time because of the initial extraction process. But this could be improved either by:
- Using PyInstaller's
onedirmode rather thanonefile; or - Doing everything within a single invocation of the executable, so it only has to be extracted once. For example, the script could execute conda commands via function calls if that is supported, or else by launching subprocesses via the Python executable in the PyInstaller temporary directory.
- Using PyInstaller's
- The install script could be run either:
-
MicroPython might be an option, but it appears to be not fully supported on WIndows. And most non-trivial code is not MicroPython-compatible out of the box, which would preclude using any third-party library.
Certain bootstrapping logic would still need to be written in a format supported directly by the OS – i.e. .sh on Linux and macOS, and .bat or .ps1 on Windows. But this would only be a small minority of the total code.
Additional Context
Windows-specific issues:
- The registry can be accessed using the
regcommand, so no additional tools or libraries are necessarily required for that. - Could shell or Python scripts be blocked by anti-malware systems?
- Lingua principale
- Python
- Stelle
- 499
- Fork
- 185
- Merge medio
- 1g 8h
- PR unite (30g)
- 19
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
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 conda/constructor
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
conda/constructor#1383 ·
I maintainer di solito rispondono entro 1 giorno
-
type::bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
conda/constructor#1067 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
conda/constructor#1380 ·
I maintainer di solito rispondono entro 1 giorno
-
Spike: Integrate conda-ship and conda-runtime for constructor buildsForse già presa @marcoesters l’ha presa 13 giorni fa. Apertatype::feature
conda/constructor#1378 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Size estimate low, based on constructor.yaml optionsForse già presa @amaloney l’ha presa 69 giorni fa. Apertatype::bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
conda/constructor#1330 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di conda/constructor
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
microsoft/agent-lightning#661 ·
I maintainer di solito rispondono entro 2 giorni
-
area/profiles comp/cli P3 type/feature
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
NousResearch/hermes-agent#146372 ·
I maintainer di solito rispondono entro 1 giorno
-
[BUG] OpenAI-compatible embedding model alias breaks embedder constructionForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
I maintainer di solito rispondono entro 1 giorno
-
[oblt-aw][autodoc] Document obs-aw-automerge contract and fix automerge doc inconsistenciesForse già presa @github-actions l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
GeoSeries scale and skew tests fail with pytest 9.2.0Forse già presa @jiayuasu l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno