summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNick Coghlan <ncoghlan@gmail.com>2017-11-26 03:04:46 (GMT)
committerGitHub <noreply@github.com>2017-11-26 03:04:46 (GMT)
commit53efbf3977a44e382397e7994a2524b4f8c9d053 (patch)
tree297668721852046e6948233328987d953f3d2114
parentcef88b9c15cf387cf6a39a387a6868883409df4f (diff)
downloadcpython-53efbf3977a44e382397e7994a2524b4f8c9d053.zip
cpython-53efbf3977a44e382397e7994a2524b4f8c9d053.tar.gz
cpython-53efbf3977a44e382397e7994a2524b4f8c9d053.tar.bz2
bpo-11063: Handle uuid.h being in default include path (GH-4565)
find_file() returns an empty list if it finds the requested header on the standard include path, so header existence checks need to be explicitly against "is not None".
-rw-r--r--setup.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/setup.py b/setup.py
index 0678dde..c22de17 100644
--- a/setup.py
+++ b/setup.py
@@ -1680,12 +1680,11 @@ class PyBuildExt(build_ext):
# Build the _uuid module if possible
uuid_incs = find_file("uuid.h", inc_dirs, ["/usr/include/uuid"])
- if uuid_incs:
+ if uuid_incs is not None:
if self.compiler.find_library_file(lib_dirs, 'uuid'):
uuid_libs = ['uuid']
else:
uuid_libs = []
- if uuid_incs:
self.extensions.append(Extension('_uuid', ['_uuidmodule.c'],
libraries=uuid_libs,
include_dirs=uuid_incs))