Formula#exec_cmd: recognize setuptools shim and refurbish args
This commit is contained in:
parent
99848607b2
commit
fe16f36f3c
@ -661,8 +661,12 @@ class Formula
|
|||||||
# Turn on argument filtering in the superenv compiler wrapper.
|
# Turn on argument filtering in the superenv compiler wrapper.
|
||||||
# We should probably have a better mechanism for this than adding
|
# We should probably have a better mechanism for this than adding
|
||||||
# special cases to this method.
|
# special cases to this method.
|
||||||
if cmd == "python" && %w[setup.py build.py].include?(args.first)
|
if cmd == "python"
|
||||||
ENV.refurbish_args
|
setup_py_in_args = %w[setup.py build.py].include?(args.first)
|
||||||
|
setuptools_shim_in_args = args.any? { |a| a.start_with? "import setuptools" }
|
||||||
|
if setup_py_in_args || setuptools_shim_in_args
|
||||||
|
ENV.refurbish_args
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
$stdout.reopen(out)
|
$stdout.reopen(out)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user