aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/requirements
diff options
context:
space:
mode:
authorJack Nagel2013-08-14 12:51:53 -0500
committerJack Nagel2013-08-14 13:02:50 -0500
commite1695f0e6755a12eb49e9008168d8d9f1c6df8fa (patch)
tree9600bb3efd4f107f84218bc1fd9faf017f8e7cef /Library/Homebrew/requirements
parentb6bb9f6a33748f88f816dd580f883064064148cf (diff)
downloadhomebrew-e1695f0e6755a12eb49e9008168d8d9f1c6df8fa.tar.bz2
Iterate over these directly rather than mapping first
Diffstat (limited to 'Library/Homebrew/requirements')
-rw-r--r--Library/Homebrew/requirements/python_dependency.rb9
1 files changed, 6 insertions, 3 deletions
diff --git a/Library/Homebrew/requirements/python_dependency.rb b/Library/Homebrew/requirements/python_dependency.rb
index e41c4fa5a..e693b1f3e 100644
--- a/Library/Homebrew/requirements/python_dependency.rb
+++ b/Library/Homebrew/requirements/python_dependency.rb
@@ -243,9 +243,12 @@ class PythonInstalled < Requirement
# Write our sitecustomize.py
file = global_site_packages/"sitecustomize.py"
ohai "Writing #{file}" if ARGV.verbose? && ARGV.debug?
- [".pyc", ".pyo", ".py"].map{ |f|
- global_site_packages/"sitecustomize#{f}"
- }.each{ |f| f.delete if f.exist? }
+
+ %w{.pyc .pyo .py}.each do |ext|
+ f = global_site_packages/"sitecustomize#{ext}"
+ f.unlink if f.exist?
+ end
+
file.write(sitecustomize)
# For non-system python's we add the opt_prefix/bin of python to the path.