summaryrefslogtreecommitdiff
path: root/homebrew/python/.make.sh-auto
diff options
context:
space:
mode:
Diffstat (limited to 'homebrew/python/.make.sh-auto')
-rw-r--r--homebrew/python/.make.sh-auto16
1 files changed, 16 insertions, 0 deletions
diff --git a/homebrew/python/.make.sh-auto b/homebrew/python/.make.sh-auto
new file mode 100644
index 000000000..5a1922cf1
--- /dev/null
+++ b/homebrew/python/.make.sh-auto
@@ -0,0 +1,16 @@
+pkg:setup
+ENV.delete "PYTHONPATH"
+xy = (prefix/"Frameworks/Python.framework/Versions").children.min.basename.to_s
+site_packages = HOMEBREW_PREFIX/"lib/python#{xy}/site-packages"
+site_packages_cellar = prefix/"Frameworks/Python.framework/Versions/#{xy}/lib/python#{xy}/site-packages"
+site_packages.mkpath
+site_packages_cellar.unlink if site_packages_cellar.exist?
+site_packages_cellar.parent.install_symlink site_packages
+rm_rf Dir["#{site_packages}/sitecustomize.py[co]"]
+(site_packages/"sitecustomize.py").atomic_write(sitecustomize)
+rm_rf Dir["#{site_packages}/setuptools*"]
+rm_rf Dir["#{site_packages}/distribute*"]
+rm_rf Dir["#{site_packages}/pip[-_.][0-9]*", "#{site_packages}/pip"]
+%w[setuptools pip wheel].each do |pkg|
+(libexec/pkg).cd do
+bin/"python3" -s setup.py --no-user-cfg install --force --verbose --install-scripts=#{bin} --install-lib=#{site_packages} --single-version-externally-managed --record=installed.txt