# HG changeset patch # User Jun Wu # Date 1490049081 25200 # Node ID 5a046021964996c49b87e3499af2c45b26fa3788 # Parent 9639ff4a93ae3f47e36700efca988a9fd9841b5b setup: add a function to test header files diff -r 9639ff4a93ae -r 5a0460219649 setup.py --- a/setup.py Mon Mar 20 15:28:08 2017 -0700 +++ b/setup.py Mon Mar 20 15:31:21 2017 -0700 @@ -127,6 +127,10 @@ code = 'int main(void) { %s(); }\n' % funcname return cancompile(cc, code) +def hasheader(cc, headername): + code = '#include <%s>\nint main(void) { return 0; }\n' % headername + return cancompile(cc, code) + # py2exe needs to be installed to work try: import py2exe