Package: datalad-installer
GitHub|PyPI|Anaconda|Issues|Changelogdatalad-installeris a script for installingDatalad,git-annex, and
related components all in a single invocation.  It requires no third-party
Python libraries, though it does make heavy use of external packaging commands.Installationdatalad-installerrequires Python 3.7 or higher.  Just usepipfor Python 3 (You have pip, right?) to install it:python3 -m pip install datalad-installerdatalad-installeris also available for conda!  To install, run:conda install -c conda-forge datalad-installerAlternatively, download the latest version directly from
<https://raw.githubusercontent.com/datalad/datalad-installer/master/src/datalad_installer.py>.Usagedatalad-installer [<global options>] <component>[=<version>] [<options>] <component>[=<version>] [<options>] ...datalad-installerprovisions one or morecomponentslisted on the command
line.  Each component is either a software package (e.g., Datalad or git-annex)
or an environment in which software packages can be installed.  If no
components are specified on the command line, the script defaults to installing
thedataladcomponent.Global Options-EFILE,--env-write-fileFILEAppend anyPATHmodifications or other
shell commands needed to use the new components
to the given file.  This option can be
specified multiple times.  If this option is
not given, the data is written to a temporary
file whose location is logged at the beginning
of the program.-lLEVEL,--log-levelLEVELSet the log level to the given value.  Possible
values are “CRITICAL”, “ERROR”,
“WARNING”, “INFO”, “DEBUG” (all
case-insensitive) and their Python integer
equivalents.  [default value: INFO]--sudo<ask|error|ok>What to do when the script needs to run a
command withsudoor privilege escalation:
ask for confirmation (default), error, or run
without confirmation.  This is always “ok”
on Windows, where the system always asks for
confirmation.-V,--versionDisplay the script version and exit-h,--helpDisplay usage information and exitComponentsvenvCreates a Python virtual environment usingpython-mvenv.  Subsequentdataladcomponents on the command line will be installed into this virtual
environment by default if not overridden by an intervening component.Options-eARGS,--extra-argsARGSSpecify extra command-line arguments to pass topython-mvenv--pathPATHCreate the virtual environment atPATH.  If
not specified, the environment will be created
in a directory in$TMPDIR.minicondaInstalls the latest version of Miniconda.  Subsequentconda-envcomponents
on the command line will use this installation, and subsequentdatalad,git-annex,rclone, andgit-annex-remote-rclonecomponents will be
installed using this conda by default if not overridden by an intervening
component.A specific version to install can be specified by suffixing “miniconda”
with “=” and the version on the command line, where the version is the
version component of a file at$ANACONDA_URLor
<https://repo.anaconda.com/miniconda/>, e.g.,py37_23.1.0-1.  Rundatalad-installerminiconda--help-versionsto see a list of available
versions for your platform.If not specified, the version defaults tolatest.The Miniconda installation script is downloaded from$ANACONDA_URL/Miniconda3-$VERSION-$OS-$ARCH.{sh,exe}, where$ANACONDA_URLis taken from the environment, defaulting tohttps://repo.anaconda.com/miniconda.Options--batchRun the Miniconda installation script in batch
(noninteractive) mode.  This is always done
when installing on Windows.In addition, if a spec is given (see below),
this option causes--yesto be passed toconda install.-cCHANNEL,--channelCHANNELSpecify additional Conda channels to use when
installing the packages listed in the spec (see
below).  This option can be specified multiple
times.-eARGS,--extra-argsARGSSpecify extra command-line arguments to pass to
the Miniconda installation script.--pathPATHInstall Miniconda atPATH.  If not
specified, it will be installed in a directory
in$TMPDIR.--python-match<major|minor|micro>Includepython=Vin the--spec, whereVis the Python version used to rundatalad-installerto the given version
level (e.g., under Python 3.9.13,--python-matchmajorwill installpython=3,minorwill installpython=3.9, andmicrowill installpython=3.9.13)--specSPECSpace-separated specifiers for packages to
install in the Conda base environment after
provisioning.--help-versionsShow a list of available Miniconda versions for
this platform and exitconda-envCreates a Conda environment.  If there is no precedingminicondacomponent
on the command line, Conda must already be installed on the system, and this
installation will be used to create the environment.Subsequentdatalad,git-annex,rclone, andgit-annex-remote-rclonecomponents will be installed into this environment
by default if not overridden by an intervening component.Options-eARGS,--extra-argsARGSSpecify extra command-line arguments to pass to
theconda createcommand.-nNAME,--nameNAMEThe name for the new environment.  If not
specified, a random name will be generated.--specSPECSpace-separated specifiers for packages to
install in the new environment.neurodebianInstalls & configuresNeuroDebian.Options-eARGS,--extra-argsARGSSpecify extra command-line arguments to pass to
thend-configurerepocommand.git-annexInstallsgit-annex.  The component takes an-m,--methodoption
specifying the installation method to use; the supported methods are:aptautobuildbrewconda(only supported on Linux)datalad/git-annexdatalad/git-annex:releasedatalad/git-annex:testeddatalad/packagesdeb-urldmgneurodebiansnapshotIf no method is specified, or if the method is set to “auto”, then the most
recent component on the command line that provides a compatible installation
method will be used.  If there is no such component, the first supported
installation method from the following list will be used:condaaptneurodebianbrewautobuilddatalad/packagesA specific version to install can be specified for those methods that support
it by suffixing “git-annex” with “=” and the version number on the
command line.Thegit-annexcomponent also accepts all options for the supported
installation methods; options not belonging to whichever method ends up used
will be ignored.dataladInstallsDatalad.  The component takes an-m,--methodoption
specifying the installation method to use; the supported methods are:aptbrewcondadeb-urlpipIf no method is specified, or if the method is set to “auto”, then the most
recent component on the command line that provides a compatible installation
method will be used.  If there is no such component, the first supported
installation method from the following list will be used:condaaptbrewA specific version to install can be specified for those methods that support
it by suffixing “datalad” with “=” and the version number on the
command line.Thedataladcomponent also accepts all options for the supported
installation methods; options not belonging to whichever method ends up used
will be ignored.rcloneInstallsrclone.  The component takes an-m,--methodoption
specifying the installation method to use; the supported methods are:aptbrewcondadeb-urldownloads.rclone.orgIf no method is specified, or if the method is set to “auto”, then the most
recent component on the command line that provides a compatible installation
method will be used.  If there is no such component, the first supported
installation method from the following list will be used:condaaptbrewdownloads.rclone.orgA specific version to install can be specified for those methods that support
it by suffixing “rclone” with “=” and the version number on the
command line.Therclonecomponent also accepts all options for the supported
installation methods; options not belonging to whichever method ends up used
will be ignored.git-annex-remote-rcloneInstallsgit-annex-remote-rclone.  The component takes an-m,--methodoption specifying the installation method to use; the supported methods are:aptbrewcondadeb-urlDanielDent/git-annex-remote-rcloneIf no method is specified, or if the method is set to “auto”, then the most
recent component on the command line that provides a compatible installation
method will be used.  If there is no such component, the first supported
installation method from the following list will be used:condaaptbrewDanielDent/git-annex-remote-rcloneA specific version to install can be specified for those methods that support
it by suffixing “git-annex-remote-rclone” with “=” and the version
number on the command line.Thegit-annex-remote-rclonecomponent also accepts all options for the
supported installation methods; options not belonging to whichever method ends
up used will be ignored.Installation MethodsaptInstalls withsudoapt-getinstall.  Supports installing specific versions.Options--build-depRunsudoapt-getbuild-depinstead ofsudoapt-getinstall.-eARGS,--extra-argsARGSSpecify extra command-line arguments to pass to
the installation command.autobuildDownloads & installs the latest official build ofgit-annexfrom
kitenet.net.  Does not support installing specific versions.This installation method is only supported on Linux and macOS.brewInstalls withbrew(Homebrew).  Does not support
installing specific versions.Options-eARGS,--extra-argsARGSSpecify extra command-line arguments to pass to
the installation command.condaInstalls withconda install.  Supports installing specific versions.Options-eARGS,--extra-argsARGSSpecify extra command-line arguments to pass to
the installation command.DanielDent/git-annex-remote-rcloneDownloads & installsgit-annex-remote-rclonefrom a release of its GitHub
project.This installation method is only supported on Linux and macOS.Options--bin-dirDIRDirectory in which to install thercloneexecutable.  Defaults to/usr/local/bin.
If this contains the string{tmpdir}, it
will be replaced with the path to a directory
in$TMPDIR.datalad/git-annexDownloads & installsgit-annexfrom the latest build ofdatalad/git-annexthat produced artifacts for the
running OS.  Does not support installing specific versions.This installation method requires a GitHub OAuth token with appropriate
permissions.  It must be specified either via theGITHUB_TOKENenvironment
variable or as the value of thehub.oauthtokenGit config option.Options--install-dirDIRDirectory in which to unpack the*.debpackage instead of installing it system-wide.
If this contains the string{tmpdir}, it
will be replaced with the path to a directory
in$TMPDIR. (Linux only)datalad/git-annex:releaseDownloads & installsgit-annexfor the running OS from the latest release
(or the specified version) ofdatalad/git-annex.  If no explicit version is specified
and the latest release lacks an asset for the running OS, the most recent
release with a matching asset is used.Options--install-dirDIRDirectory in which to unpack the*.debpackage instead of installing it system-wide.
If this contains the string{tmpdir}, it
will be replaced with the path to a directory
in$TMPDIR. (Linux only)datalad/git-annex:testedDownloads & installsgit-annexfrom the latest successful build ofdatalad/git-annexfor the running OS.
Does not support installing specific versions.This installation method requires a GitHub OAuth token with appropriate
permissions.  It must be specified either via theGITHUB_TOKENenvironment
variable or as the value of thehub.oauthtokenGit config option.Options--install-dirDIRDirectory in which to unpack the*.debpackage instead of installing it system-wide.
If this contains the string{tmpdir}, it
will be replaced with the path to a directory
in$TMPDIR. (Linux only)datalad/packagesDownloads & installsgit-annexfrom
<https://datasets.datalad.org/?dir=/datalad/packages> for the running OS.
Supports installing specific versions (though note that the version strings for
this method tend to include Git commit information, e.g.,
“8.20210127+git111-gbe5a0e4b8”).Options--install-dirDIRDirectory in which to unpack the*.debpackage instead of installing it system-wide.
If this contains the string{tmpdir}, it
will be replaced with the path to a directory
in$TMPDIR. (Linux only)deb-urlDownload & install a given*.debpackage.  Does not support installing
specific versions.Options-eARGS,--extra-argsARGSSpecify extra command-line arguments to pass to
the installation command.--install-dirDIRDirectory in which to unpack the*.debpackage instead of installing it system-wide.
If this contains the string{tmpdir}, it
will be replaced with the path to a directory
in$TMPDIR.  If this contains the string{version}, it will be replaced with the
package’s version. (git-annexonly)--urlURLSpecify the URL of the*.debpackage.  This
option is required for this installation
method.dmgInstallsgit-annexto the/Applicationsdirectory from a properly-built*.dmgimage.  Does not support installing specific versions.This installation method is only supported on macOS.Options--pathPATHSpecify the path to the*.dmgimage.  This
option is required for this installation
method.downloads.rclone.orgDownloads & installsrclonefrom <https://downloads.rclone.org>.Options--bin-dirDIRDirectory in which to install thercloneexecutable.  This option is required on
Windows.  On Linux & macOS, the directory
defaults to/usr/local/bin.  If the path
contains the string{tmpdir}, it will be
replaced with the path to a directory in$TMPDIR.--man-dirDIRDirectory under which to install therclonemanpage; specifically, the filerclone.1will be placed in theman1/subdirectory of
the given directory.  If this option is not
specified, the manpage is not installed.  If
the path contains the string{tmpdir}, it
will be replaced with the path to a directory
in$TMPDIR(the same one as used for--bin-dir, if applicable).neurodebianInstalls from NeuroDebian repositories withsudoapt-getinstall.  Supports
installing specific versions.Options--build-depRunsudoapt-getbuild-depinstead ofsudoapt-getinstall.-eARGS,--extra-argsARGSSpecify extra command-line arguments to pass to
the installation command.pipInstalls withpython-mpip.  Supports installing specific versions.If avenvcomponent is previously given on the command line, the
installation will be performed in that virtual environment; otherwise, it will
be performed using the same Python used to rundatalad-installer.Options--develInstall the given component from its GitHub
repository instead of from PyPI.-eARGS,--extra-argsARGSSpecify extra command-line arguments to pass to
the installation command.-EEXTRAS,--extrasEXTRASSpecify (comma-separated) package extras to
install.snapshotDownloads & installs the latest official snapshot build ofgit-annexfrom
kitenet.net.  Does not support installing specific versions.This installation method is only supported on Linux and macOS.