Skip to content

Commit 223da1c

Browse files
author
Jarl Stefansson
committed
Fix wheel/pip1.5 handing with requirements
1 parent ce3562f commit 223da1c

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

manifests/virtualenv.pp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -127,17 +127,17 @@
127127
# version, this makes sure we only use wheels if they are supported
128128

129129
exec { "python_virtualenv_${venv_dir}":
130-
command => "mkdir -p ${venv_dir} ${proxy_command} && virtualenv ${system_pkgs_flag} -p ${python} ${venv_dir} && ${venv_dir}/bin/pip wheel --help > /dev/null 2>&1 && { ${venv_dir}/bin/pip wheel --version > /dev/null 2>&1 || wheel_support_flag='--no-use-wheel'; } ; ${venv_dir}/bin/pip --log ${venv_dir}/pip.log install ${pypi_index} ${proxy_flag} \$wheel_support_flag --upgrade pip ${distribute_pkg}",
131-
user => $owner,
132-
path => $path,
133-
cwd => "/tmp",
130+
command => "mkdir -p ${venv_dir} ${proxy_command} && virtualenv ${system_pkgs_flag} -p ${python} ${venv_dir} && ${venv_dir}/bin/pip wheel --help > /dev/null 2>&1 && { ${venv_dir}/bin/pip wheel --version > /dev/null 2>&1 || wheel_support_flag='--no-use-wheel'; } ; ${venv_dir}/bin/pip --log ${venv_dir}/pip.log install ${pypi_index} ${proxy_flag} \$wheel_support_flag --upgrade pip ${distribute_pkg}",
131+
user => $owner,
132+
path => $path,
133+
cwd => "/tmp",
134134
environment => $environment,
135-
unless => "grep '^[\\t ]*VIRTUAL_ENV=[\\\\'\\\"]*${venv_dir}[\\\"\\\\'][\\t ]*$' ${venv_dir}/bin/activate", #Unless activate exists and VIRTUAL_ENV is correct we re-create the virtualenv
135+
unless => "grep '^[\\t ]*VIRTUAL_ENV=[\\\\'\\\"]*${venv_dir}[\\\"\\\\'][\\t ]*$' ${venv_dir}/bin/activate", #Unless activate exists and VIRTUAL_ENV is correct we re-create the virtualenv
136136
}
137137

138138
if $requirements {
139139
exec { "python_requirements_initial_install_${requirements}_${venv_dir}":
140-
command => "${venv_dir}/bin/pip --log ${venv_dir}/pip.log install ${pypi_index} ${proxy_flag} ${wheel_support_flag} -r ${requirements}",
140+
command => "${venv_dir}/bin/pip wheel --help > /dev/null 2>&1 && { ${venv_dir}/bin/pip wheel --version > /dev/null 2>&1 || wheel_support_flag='--no-use-wheel'; } ; ${venv_dir}/bin/pip --log ${venv_dir}/pip.log install ${pypi_index} ${proxy_flag} \$wheel_support_flag -r ${requirements}",
141141
refreshonly => true,
142142
timeout => $timeout,
143143
user => $owner,

0 commit comments

Comments
 (0)