Skip to content

Commit e504a4d

Browse files
authored
Merge pull request #446 from jacobkahn/fix_false_positive_compression_libs
Explicitly try to compile with header inclusion in Python setup
2 parents 35f1458 + 44b1451 commit e504a4d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#Does gcc compile with this header and library?
1212
def compile_test(header, library):
1313
dummy_path = os.path.join(os.path.dirname(__file__), "dummy")
14-
command = "bash -c \"g++ -include " + header + " -l" + library + " -x c++ - <<<'int main() {}' -o " + dummy_path + " >/dev/null 2>/dev/null && rm " + dummy_path + " 2>/dev/null\""
14+
command = "bash -c \"g++ -include " + header + " -l" + library + " -x c++ - <<<'#include <" + header + ">\nint main() {}' -o " + dummy_path + " >/dev/null 2>/dev/null && rm " + dummy_path + " 2>/dev/null\""
1515
return os.system(command) == 0
1616

1717
# Use an environment variable

0 commit comments

Comments
 (0)