You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@jjallaire Here are some thoughts on how we might enable Python users to more easily install quarto.
How to invoke command
This would work if you think of it as the Python package just bootstrapping the installation process for you.
pip install quarto
python -m quarto install-cli [--version=<latest|prerelease|1.3.450>]
Or if we're literally bundling the quarto binaries into packages hosted on pip, it might be more like:
# Doesn't install quarto cli
pip install quarto
# Installs for Windows
pip install quarto[cli-windows]
# etc.
pip install quarto[cli-mac]
pip install quarto[cli-linux-x64]
pip install quarto[cli-linux-arm64]
# Or maybe automatically??
pip install quarto[cli]
Installation methods
Both methods below will need to discover the latest current (or prerelease, optionally?) quarto version so it knows what to download. Also should be able to let the user specify the desired version.
Untar (for virtualenvs)
Download a platform-specific tarball from https://quarto.org/docs/download/ and unpack it somewhere within sysconfig.get_path("data"). Set up a quarto alias or passthrough script and put it in sysconfig.get_path("scripts").
Package installer (for system python)
For system Python, I think there's not a reason to do a tarball and it's better just to install from the normal installer. Otherwise we're trying to untar stuff into /usr/local/bin or whatever, which both feels aggressive and also would require the user to retry the command with sudo.
In this case, we'd just download the installer to a temp directory and invoke it, I guess?
I think we might want something that provides stronger affinity to the version actually installed (i.e. no logical separation of pip install and python -m quarto install-cli). That way when someone installs a given version of the quarto package they know they will reproducibly get the same version of quarto-cli.
So I am thinking of something like:
The PyPI package version carries the version of the released quarto-cli (e.g. 1.3.202)
During setup.py or on first use it downloads exactly that version of the quarto-cli
Pre-releases of quarto can be installed directly from git tags (and behave the same way).
I am thinking that if we don't do this then pip install quarto doesn't actually "pin" a version of quarto in requirements.txt.
Yeah, that makes sense. Also, if pip install quarto is enough to fully install the quarto-cli then that's good for Connect/ShinyApps.io/Docker as it will do the download at build time rather than while the user is waiting.
@jjallaire Here are some thoughts on how we might enable Python users to more easily install quarto.
How to invoke command
This would work if you think of it as the Python package just bootstrapping the installation process for you.
Or if we're literally bundling the quarto binaries into packages hosted on pip, it might be more like:
Installation methods
Both methods below will need to discover the latest current (or prerelease, optionally?) quarto version so it knows what to download. Also should be able to let the user specify the desired version.
Untar (for virtualenvs)
Download a platform-specific tarball from https://quarto.org/docs/download/ and unpack it somewhere within
sysconfig.get_path("data")
. Set up aquarto
alias or passthrough script and put it insysconfig.get_path("scripts")
.Package installer (for system python)
For system Python, I think there's not a reason to do a tarball and it's better just to install from the normal installer. Otherwise we're trying to untar stuff into
/usr/local/bin
or whatever, which both feels aggressive and also would require the user to retry the command with sudo.In this case, we'd just download the installer to a temp directory and invoke it, I guess?
Resources
Detecting whether in a venv/virtualenv/pyvenv/pipenv or conda env
The text was updated successfully, but these errors were encountered: