Skip to content

Commit

Permalink
Merge pull request #3899 from MikeMcQuaid/diagnostic-remove-python-pth
Browse files Browse the repository at this point in the history
diagnostic: remove python pth check.
  • Loading branch information
MikeMcQuaid authored Mar 9, 2018
2 parents df1fb59 + bdb8664 commit 8d22cb7
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions Library/Homebrew/diagnostic.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1016,24 +1016,6 @@ def check_for_unlinked_but_not_keg_only
EOS
end

def check_for_pth_support
homebrew_site_packages = Language::Python.homebrew_site_packages
return unless homebrew_site_packages.directory?
return if Language::Python.reads_brewed_pth_files?("python") != false
return unless Language::Python.in_sys_path?("python", homebrew_site_packages)

user_site_packages = Language::Python.user_site_packages "python"
<<~EOS
Your default Python does not recognize the Homebrew site-packages
directory as a special site-packages directory, which means that .pth
files will not be followed. This means you will not be able to import
some modules after installing them with Homebrew, like wxpython. To fix
this for the current user, you can run:
mkdir -p #{user_site_packages}
echo 'import site; site.addsitedir("#{homebrew_site_packages}")' >> #{user_site_packages}/homebrew.pth
EOS
end

def check_for_external_cmd_name_conflict
cmds = Tap.cmd_directories.flat_map { |p| Dir["#{p}/brew-*"] }.uniq
cmds = cmds.select { |cmd| File.file?(cmd) && File.executable?(cmd) }
Expand Down

0 comments on commit 8d22cb7

Please sign in to comment.