diff options
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/formula_cellar_checks.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Library/Homebrew/formula_cellar_checks.rb b/Library/Homebrew/formula_cellar_checks.rb index 1c2217478..282b9b9da 100644 --- a/Library/Homebrew/formula_cellar_checks.rb +++ b/Library/Homebrew/formula_cellar_checks.rb @@ -156,6 +156,23 @@ module FormulaCellarChecks EOS end + def check_python_framework_links lib + python_modules = Pathname.glob lib/"python*/site-packages/**/*.so" + framework_links = python_modules.select do |obj| + dlls = obj.dynamically_linked_libraries + dlls.any? { |dll| /Python\.framework/.match dll } + end + return if framework_links.empty? + + <<-EOS.undent + python modules have explicit framework links + These python extension modules were linked directly to a Python + framework binary. They should be linked with -undefined dynamic_lookup + instead of -lpython or -framework Python. + #{framework_links * "\n "} + EOS + end + def audit_installed audit_check_output(check_manpages) audit_check_output(check_infopages) @@ -168,6 +185,7 @@ module FormulaCellarChecks audit_check_output(check_shadowed_headers) audit_check_output(check_easy_install_pth(formula.lib)) audit_check_output(check_openssl_links) + audit_check_output(check_python_framework_links(formula.lib)) end private |
