Skip to content

Commit 53efbf3

Browse files
authored
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".
1 parent cef88b9 commit 53efbf3

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

setup.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1680,12 +1680,11 @@ class db_found(Exception): pass
16801680

16811681
# Build the _uuid module if possible
16821682
uuid_incs = find_file("uuid.h", inc_dirs, ["/usr/include/uuid"])
1683-
if uuid_incs:
1683+
if uuid_incs is not None:
16841684
if self.compiler.find_library_file(lib_dirs, 'uuid'):
16851685
uuid_libs = ['uuid']
16861686
else:
16871687
uuid_libs = []
1688-
if uuid_incs:
16891688
self.extensions.append(Extension('_uuid', ['_uuidmodule.c'],
16901689
libraries=uuid_libs,
16911690
include_dirs=uuid_incs))

0 commit comments

Comments
 (0)