diff options
| author | Jack Nagel | 2014-04-15 12:00:16 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-04-15 12:04:39 -0500 |
| commit | e97bbeb9a76578c46fa190884c1601b2713cddb0 (patch) | |
| tree | aaa28415e030dd08ad71c0903ca2345791ef670f | |
| parent | 943884215b9255d62f8a018aaaf9248a0548ed15 (diff) | |
| download | homebrew-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.
| -rw-r--r-- | Library/Formula/python.rb | 1 | ||||
| -rw-r--r-- | Library/Formula/python3.rb | 1 |
2 files changed, 2 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 diff --git a/Library/Formula/python3.rb b/Library/Formula/python3.rb index 0d0565909..25b1eeb08 100644 --- a/Library/Formula/python3.rb +++ b/Library/Formula/python3.rb @@ -137,6 +137,7 @@ class Python3 < 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 |
