Audit formulæ for easy-install.pth files
Closes Homebrew/homebrew#32860.
This commit is contained in:
parent
f2fa551291
commit
9134718f9c
@ -568,6 +568,7 @@ class FormulaAuditor
|
|||||||
audit_check_output(check_non_executables(f.sbin))
|
audit_check_output(check_non_executables(f.sbin))
|
||||||
audit_check_output(check_generic_executables(f.sbin))
|
audit_check_output(check_generic_executables(f.sbin))
|
||||||
audit_check_output(check_shadowed_headers)
|
audit_check_output(check_shadowed_headers)
|
||||||
|
audit_check_output(check_easy_install_pth(f.lib))
|
||||||
end
|
end
|
||||||
|
|
||||||
def audit
|
def audit
|
||||||
|
|||||||
@ -120,6 +120,19 @@ module FormulaCellarChecks
|
|||||||
"The offending files are: \n #{files * "\n "}"]
|
"The offending files are: \n #{files * "\n "}"]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def check_easy_install_pth lib
|
||||||
|
pth_found = Dir["#{lib}/python{2.7,3.4}/site-packages/easy-install.pth"].map { |f| File.dirname(f) }
|
||||||
|
return if pth_found.empty?
|
||||||
|
|
||||||
|
["easy-install.pth files were found in #{pth_found.join(", ")}.",
|
||||||
|
<<-EOS.undent
|
||||||
|
These .pth files are likely to cause link conflicts. Please
|
||||||
|
invoke setup.py with options --single-version-externally-managed
|
||||||
|
--record=install.txt.
|
||||||
|
EOS
|
||||||
|
]
|
||||||
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def relative_glob(dir, pattern)
|
def relative_glob(dir, pattern)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user