Skip to content

Commit

Permalink
Remove homebrew site-package symlink if exists
Browse files Browse the repository at this point in the history
  • Loading branch information
markreidvfx committed Jan 19, 2020
1 parent c1491d3 commit 8292c6c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions scripts/appleseed.package.py
Original file line number Diff line number Diff line change
Expand Up @@ -744,6 +744,14 @@ def __add_python_to_stage(self):
# just copy everything
merge_tree(self.settings.python_path, python_dir, symlinks=True)

# Homebrew will create a symlink for site-packages.
# Replace it with a empty directory if found
python_home = os.path.join(python_dir, "Frameworks/Python.framework/Versions/2.7")
site_packages_path = os.path.join(python_home, "lib/python2.7/site-packages")
if os.path.islink(site_packages_path):
os.remove(site_packages_path)
safe_make_directory(site_packages_path)

def __copy_qt_framework(self, framework_name):
framework_dir = framework_name + ".framework"
src_filepath = os.path.join(self.settings.qt_runtime_path, "lib", framework_dir, "Versions", "5", framework_name)
Expand Down

0 comments on commit 8292c6c

Please sign in to comment.