From e97bbeb9a76578c46fa190884c1601b2713cddb0 Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Tue, 15 Apr 2014 12:00:16 -0500 Subject: 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. --- Library/Formula/python.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'Library/Formula/python.rb') 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 -- cgit v1.2.3