-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
PR: Migrate the Spyder update mechanism to the conda-based standalone application #20900
Conversation
95ff870
to
526ca06
Compare
I've added questions and proposals to the PR description. Pinging @spyder-ide/core-developers for feedback. |
@jaimergp, is it possible to add custom options to the package installer ( I suppose this would be simple enough to add in a post-install script for Linux, since the installer is already a shell script, and the post-install script could request user input. |
You can use post-install scripts in all three platforms, and they can be disabled with the corresponding flags. There will be checkboxes (with a custom description if you want) to disable them too. So I think you can hack something together. On Windows, you can also customize the "conclusion" page with your own NSIS code. See this example. |
65c8bbc
to
8f37046
Compare
Is it possible to have multiple post-install scripts, each with their own enable/disable flags? Both macOS and Linux must do other things in post-install, independent of a "start application" option. So the option to start the application must be independent of other post-install actions. Perhaps our post-install actions can be done in the pre-install script instead, leaving the post-install script dedicated to starting the application. |
@spyder-ide/core-developers, I've updated the "Proposed path forward" in the PR description. I invite your comments. |
Unfortunately not. A "launch after installation" is a common feature request for an installer though, so maybe we could add it in |
@spyder-ide/core-developers, I updated the proposed path forward based on our meeting discussion today. |
Looks good to me, but I never used the stand-alone installer so it is all theoretical for me. |
8f37046
to
b0f1603
Compare
f6a86b4
to
e179dcc
Compare
e179dcc
to
401990f
Compare
@mrclary, could you post some gifs in the OP of how the new update process looks in different OSes? Thanks! |
@ccordoba12 @CAM-Gerlach, |
8f061a9
to
85a5e2b
Compare
ApplicationUpdateStatus.start_update determines whether to start_download or go directly to confirm_installation.
9630bd3
to
bf7b5fc
Compare
FYI, |
@spyder-ide/core-developers, I've un-drafted this PR. Please refer to the PR description for instructions on how to test the changes made here. |
…vironments and PyPi otherwise.
ApplicationContainer determines whether to download.
Container will only handle the WorkerUpdates and resulting errors, otherwise send results to UpdateInstallerDialog.
bf7b5fc
to
02efd58
Compare
02efd58
to
6ef4b68
Compare
Closing as superseded by #21483. |
Description of Changes
The reasons for this are as follows. Users of our conda-based installers, conda-forge installs, and PyPi installs will only be alerted to updates when its actually available to be installed. This may not be the case if checking against GitHub. Anaconda main channel installs will almost certainly be notified before the version is actually available on this channel, however, our install instructions should allow them safely install from the conda-forge channel without breaking their environment. Since anaconda main updates have extremely long lead times, users likely will not be alerted to our new conda-based installer until 6.1.0 is released. I think there is a large advantage to alerting these users sooner and makes this is an acceptable tradeoff.
Questions
Proposed path forward
Note that the downloaded installer will always be run interactively. The primary reason for this is that the user will be able to see the progress of the install. If the macOS installer is run in batch mode, then the only way to view the progress (several minutes!) will be to have the installer batch script launched in a terminal and tail stream the
install.log
file (similar to our GitHub workflow). I don't know if this is possible on Windows. In either case, the interactive installer will be more aesthetically pleasing to the user rather than a mysterious terminal window popping up and spitting out a bunch of seemingly random garbage. Unfortunately, this is unavoidable for the case where we update through conda.Interactive Testing
mrclary:issue-20831-cbi-updater
branch in your local Spyder repository.spyder/__init__.py
. Change the version on line 32 to(5, 4, 4, "dev0")
.spyder/plugins/application/container.py
. Change the delay interval on line 339 from60000
ms to10000
ms. This is not strictly necessary, but it is easier to test when only waiting 10s instead of 60s to trigger the updater at Spyder startup.spyder/plugins/application/scripts/install.[sh|bat]
. Remove-y
from the conda install command on line 16 (.sh
) and line 66 (.bat
) to allow you to cancel a conda update without clobbering your existing install.spyder/plugins/application/scripts/install.sh
. Add|| true
to the end of line 36 to allow you to cancel an uninstall without aborting the call to the installer.spyder/workers/updates.py
. Change line 92 to readconda
mechanisms.GIFs
--yes
flag in order to be able to cancel the conda install (this is destructive). Spyder starts up after the install is complete.Windows GIF
Linux GIF
macOS GIF