Permalink
Browse files

Initial cut at preinstalling NumPy, references #48

Code in the tutorial works but it installed surprisingly quickly
(~ 2 minutes per virtualenv). We will see how it goes.
  • Loading branch information...
michaelklishin committed Nov 4, 2012
1 parent e0928ab commit d552f49d0307a199146ebae670909e60e20e09f2
Showing with 9 additions and 3 deletions.
  1. +1 −1 ci_environment/python/attributes/default.rb
  2. +8 −2 ci_environment/python/recipes/multi.rb
@@ -19,4 +19,4 @@
#
default['python']['multi']['pythons'] = %w(python2.5 python2.6 python2.7 python3.1 python3.2 pypy)
-default['python']['pip']['packages'] = %w(nose pytest mock)
+default['python']['pip']['packages'] = %w(nose pytest mock numpy)
@@ -92,14 +92,20 @@
end
end
+ packages = if py.to_s.downcase == "pypy"
+ node.python.pip.packages.reject { |p| p =~ /numpy/ }
+ else
+ node.python.pip.packages
+ end
+
script "preinstall pip packages for virtualenv set 1 (#{py})" do
interpreter "bash"
user node.travis_build_environment.user
group node.travis_build_environment.group
cwd node.travis_build_environment.home
code <<-EOH
- #{installation_root}/#{py}/bin/pip install --quiet #{node.python.pip.packages.join(' ')} --use-mirrors
+ #{installation_root}/#{py}/bin/pip install --quiet #{packages.join(' ')} --use-mirrors
EOH
environment({ "VIRTUAL_ENV_DISABLE_PROMPT" => "true" })
@@ -114,7 +120,7 @@
cwd node.travis_build_environment.home
code <<-EOH
- #{installation_root}/#{py}_with_system_site_packages/bin/pip install --quiet #{node.python.pip.packages.join(' ')} --use-mirrors
+ #{installation_root}/#{py}_with_system_site_packages/bin/pip install --quiet #{packages.join(' ')} --use-mirrors
EOH
environment({ "VIRTUAL_ENV_DISABLE_PROMPT" => "true" })

0 comments on commit d552f49

Please sign in to comment.