def _configure_and_install_native_packages(env, pkg_install): """ Setups up native package repositories, determines list of native packages to install, and installs them. """ env.logger.debug("Configure and install native packages for distribution: " + env.distribution) home_dir = env.safe_run("echo $HOME") if home_dir: if env.shell_config.startswith("~"): nonhome = env.shell_config.split("~/", 1)[-1] env.shell_config = os.path.join(home_dir, nonhome) if env.distribution in ["debian", "ubuntu"]: _setup_apt_sources() _setup_apt_automation() _add_apt_gpg_keys() _apt_packages(pkg_install) elif env.distribution in ["centos", "scientificlinux"]: _setup_yum_sources() _yum_packages(pkg_install) if env.edition.short_name not in ["minimal"]: _setup_yum_bashrc() elif env.distribution == "arch": pass # No package support for Arch yet elif env.distribution == "macosx": brew.install_packages(env, pkg_install) else: raise NotImplementedError("Unknown target distribution")
def _configure_and_install_native_packages(env, pkg_install): """ Setups up native package repositories, determines list of native packages to install, and installs them. """ from fabric.api import env from cloudbio.package import brew from cloudbio.package.deb import (_apt_packages, _add_apt_gpg_keys, _setup_apt_automation, _setup_apt_sources) from cloudbio.package.rpm import (_yum_packages, _setup_yum_bashrc, _setup_yum_sources) home_dir = env.safe_run("echo $HOME") if home_dir: if env.shell_config.startswith("~"): nonhome = env.shell_config.split("~/", 1)[-1] env.shell_config = os.path.join(home_dir, nonhome) if env.distribution in ["debian", "ubuntu"]: _setup_apt_sources() _setup_apt_automation() _add_apt_gpg_keys() _apt_packages(pkg_install) elif env.distribution in ["centos", "scientificlinux"]: _setup_yum_sources() _yum_packages(pkg_install) _setup_yum_bashrc() elif env.distribution in ["arch", "suse"]: pass # No package support for Arch, SUSE yet elif env.distribution == "macosx": brew.install_packages(env, pkg_install) else: raise NotImplementedError("Unknown target distribution")
def _configure_and_install_native_packages(env, pkg_install): """ Setups up native package repositories, determines list of native packages to install, and installs them. """ home_dir = env.safe_run("echo $HOME") if home_dir: if env.shell_config.startswith("~"): nonhome = env.shell_config.split("~/", 1)[-1] env.shell_config = os.path.join(home_dir, nonhome) if env.distribution in ["debian", "ubuntu"]: _setup_apt_sources() _setup_apt_automation() _add_apt_gpg_keys() _apt_packages(pkg_install) elif env.distribution in ["centos", "scientificlinux"]: _setup_yum_sources() _yum_packages(pkg_install) if env.edition.short_name not in ["minimal"]: _setup_yum_bashrc() elif env.distribution == "arch": pass # No package support for Arch yet elif env.distribution == "macosx": brew.install_packages(env, pkg_install) else: raise NotImplementedError("Unknown target distribution")
def install_brew(p=None, flavor=None): """Top level access to homebrew/linuxbrew packages. p is a package name to install, or all configured packages if not specified. """ _setup_logging(env) _configure_fabric_environment(env, flavor, ignore_distcheck=True) system.install_homebrew(env) if p is not None: brew.install_packages(env, packages=[p]) else: pkg_install = _read_main_config()[0] brew.install_packages(env, to_install=pkg_install)
def install_brew(p=None, version=None, flavor=None, automated=False): """Top level access to homebrew/linuxbrew packages. p is a package name to install, or all configured packages if not specified. """ if not automated: _setup_logging(env) _configure_fabric_environment(env, flavor, ignore_distcheck=True) if p is not None: if version: p = "%s==%s" % (p, version) brew.install_packages(env, packages=[p]) else: pkg_install = _read_main_config()[0] brew.install_packages(env, to_install=pkg_install)