aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd
diff options
context:
space:
mode:
authorSamuel John2013-06-13 15:05:19 +0200
committerSamuel John2013-06-19 12:27:50 +0200
commit49d04cb5b7fbbe8a88e9c4fabe288b7899e4e3e7 (patch)
tree3f35b4e6305582ea16f8b90879fc06656f4c5315 /Library/Homebrew/cmd
parente00f1a998e7d82861164407d4bdf13f444856f91 (diff)
downloadhomebrew-49d04cb5b7fbbe8a88e9c4fabe288b7899e4e3e7.tar.bz2
doctor: share/python no longer needed in PATH
Check for HOMEBREW_PREFIX/share/python and python3 in PATH and tell about the new location and that files from there can be removed. Also instructions on how to upgrade python packages are given.
Diffstat (limited to 'Library/Homebrew/cmd')
-rw-r--r--Library/Homebrew/cmd/doctor.rb20
1 files changed, 20 insertions, 0 deletions
diff --git a/Library/Homebrew/cmd/doctor.rb b/Library/Homebrew/cmd/doctor.rb
index 4678905b5..6c64a61ce 100644
--- a/Library/Homebrew/cmd/doctor.rb
+++ b/Library/Homebrew/cmd/doctor.rb
@@ -932,6 +932,26 @@ def check_for_enthought_python
end
end
+def check_for_old_homebrew_share_python_in_path
+ s = ''
+ ['', '3'].map do |suffix|
+ if paths.include?((HOMEBREW_PREFIX/"share/python#{suffix}").to_s)
+ s += "#{HOMEBREW_PREFIX}/share/python#{suffix} is not needed in PATH.\n"
+ end
+ end
+ unless s.empty?
+ s += <<-EOS.undent
+ Formerly homebrew put Python scripts you installed via `pip` or `pip3`
+ (or `easy_install`) into that directory above but now it can be removed
+ from your PATH variable.
+ Python scripts will now install into #{HOMEBREW_PREFIX}/bin.
+ You can delete anything, except 'Extras', from the #{HOMEBREW_PREFIX}/share/python
+ (and #{HOMEBREW_PREFIX}/share/python3) dir and install affected Python packages
+ anew with `pip install --upgrade`.
+ EOS
+ end
+end
+
def check_for_bad_python_symlink
return unless which "python"
# Indeed Python -V outputs to stderr (WTF?)