aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/language/python.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/Library/Homebrew/language/python.rb b/Library/Homebrew/language/python.rb
index b28b1ca60..23c5246ba 100644
--- a/Library/Homebrew/language/python.rb
+++ b/Library/Homebrew/language/python.rb
@@ -215,6 +215,13 @@ module Language
f.unlink
f.make_symlink new_target
end
+
+ Pathname.glob(@venv_root/"lib/python*/orig-prefix.txt").each do |prefix_file|
+ prefix_path = prefix_file.read
+ python = prefix_path.include?("python3") ? "python3" : "python"
+ prefix_path.sub! %r{^#{HOMEBREW_CELLAR}/#{python}/[^/]+}, Formula[python].opt_prefix
+ prefix_file.atomic_write prefix_path
+ end
end
# Installs packages represented by `targets` into the virtualenv.