From c7cf56020e53e334999090b02cd567b3ac4d59f7 Mon Sep 17 00:00:00 2001 From: Christian Garling Date: Thu, 6 Apr 2017 20:35:37 +0200 Subject: [PATCH] Fixed python::virtualenv * added ${pip_cmd} install --upgrade pip to have a recent pip version installed, the python::virtualenv function failed with pip 1.4.1 * replaced --no-use-wheel with --no-binary :all: as a dependency of recent pip version --- manifests/virtualenv.pp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manifests/virtualenv.pp b/manifests/virtualenv.pp index 459b3399..1d328f7b 100644 --- a/manifests/virtualenv.pp +++ b/manifests/virtualenv.pp @@ -159,7 +159,7 @@ $pip_cmd = "${python::exec_prefix}${venv_dir}/bin/pip" exec { "python_virtualenv_${venv_dir}": - command => "true ${proxy_command} && ${virtualenv_cmd} ${system_pkgs_flag} -p ${python} ${venv_dir} && ${pip_cmd} wheel --help > /dev/null 2>&1 && { ${pip_cmd} wheel --version > /dev/null 2>&1 || wheel_support_flag='--no-use-wheel'; } ; { ${pip_cmd} --log ${venv_dir}/pip.log install ${pypi_index} ${proxy_flag} \$wheel_support_flag --upgrade pip ${distribute_pkg} || ${pip_cmd} --log ${venv_dir}/pip.log install ${pypi_index} ${proxy_flag} --upgrade pip ${distribute_pkg} ;}", + command => "true ${proxy_command} && ${virtualenv_cmd} ${system_pkgs_flag} -p ${python} ${venv_dir} && ${pip_cmd} install --upgrade pip && ${pip_cmd} wheel --help > /dev/null 2>&1 && { ${pip_cmd} wheel --version > /dev/null 2>&1 || wheel_support_flag='--no-binary :all:'; } ; { ${pip_cmd} --log ${venv_dir}/pip.log install ${pypi_index} ${proxy_flag} \$wheel_support_flag --upgrade pip ${distribute_pkg} || ${pip_cmd} --log ${venv_dir}/pip.log install ${pypi_index} ${proxy_flag} --upgrade pip ${distribute_pkg} ;}", user => $owner, creates => "${venv_dir}/bin/activate", path => $path, @@ -171,7 +171,7 @@ if $requirements { exec { "python_requirements_initial_install_${requirements}_${venv_dir}": - command => "${pip_cmd} wheel --help > /dev/null 2>&1 && { ${pip_cmd} wheel --version > /dev/null 2>&1 || wheel_support_flag='--no-use-wheel'; } ; ${pip_cmd} --log ${venv_dir}/pip.log install ${pypi_index} ${proxy_flag} \$wheel_support_flag -r ${requirements} ${extra_pip_args}", + command => "${pip_cmd} wheel --help > /dev/null 2>&1 && { ${pip_cmd} wheel --version > /dev/null 2>&1 || wheel_support_flag='--no-binary :all:'; } ; ${pip_cmd} --log ${venv_dir}/pip.log install ${pypi_index} ${proxy_flag} \$wheel_support_flag -r ${requirements} ${extra_pip_args}", refreshonly => true, timeout => $timeout, user => $owner,