aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/python.rb
diff options
context:
space:
mode:
authorJack Nagel2014-04-15 12:00:16 -0500
committerJack Nagel2014-04-15 12:04:39 -0500
commite97bbeb9a76578c46fa190884c1601b2713cddb0 (patch)
treeaaa28415e030dd08ad71c0903ca2345791ef670f /Library/Formula/python.rb
parent943884215b9255d62f8a018aaaf9248a0548ed15 (diff)
downloadhomebrew-e97bbeb9a76578c46fa190884c1601b2713cddb0.tar.bz2
python: fix site-packages symlink
If the target exists and is a symlink to a directory, FileUtils.ln_sf will follow the link and create the new symlink inside the target. This results in a broken symlink like: /usr/local/lib/python2.7/site-packages/site-packages -> ../../../../../../../../../lib/python2.7/site-packages Fix this by unlinking the target first.
Diffstat (limited to 'Library/Formula/python.rb')
-rw-r--r--Library/Formula/python.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/Library/Formula/python.rb b/Library/Formula/python.rb
index 3de30b917..c934dbe37 100644
--- a/Library/Formula/python.rb
+++ b/Library/Formula/python.rb
@@ -148,6 +148,7 @@ class Python < Formula
site_packages.mkpath
# Symlink the prefix site-packages into the cellar.
+ site_packages_cellar.unlink
site_packages_cellar.parent.install_symlink site_packages
# Write our sitecustomize.py