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.
This commit is contained in:
parent
b7dfef9033
commit
f8d7a6fa79
2 changed files with 2 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue