diff options
author | Christian Heimes <christian@python.org> | 2021-11-02 11:25:13 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-02 11:25:13 (GMT) |
commit | 77a1f8d94c29da7bda4bd43e5a9c2233573d46ee (patch) | |
tree | e80fe944c36e256431b78e712b37ab2e87dff33a /setup.py | |
parent | 34098991289cb3e8eec012fa0243f30b9709666f (diff) | |
download | cpython-77a1f8d94c29da7bda4bd43e5a9c2233573d46ee.zip cpython-77a1f8d94c29da7bda4bd43e5a9c2233573d46ee.tar.gz cpython-77a1f8d94c29da7bda4bd43e5a9c2233573d46ee.tar.bz2 |
bpo-43158: Use configure values for building _uuid extension (GH-29353)
Diffstat (limited to 'setup.py')
-rw-r--r-- | setup.py | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -1842,15 +1842,15 @@ class PyBuildExt(build_ext): def detect_uuid(self): # Build the _uuid module if possible - uuid_incs = find_file("uuid.h", self.inc_dirs, ["/usr/include/uuid"]) - if uuid_incs is not None: - if self.compiler.find_library_file(self.lib_dirs, 'uuid'): - uuid_libs = ['uuid'] + uuid_h = sysconfig.get_config_var("HAVE_UUID_H") + uuid_uuid_h = sysconfig.get_config_var("HAVE_UUID_UUID_H") + if uuid_h or uuid_uuid_h: + if sysconfig.get_config_var("HAVE_LIBUUID"): + uuid_libs = ["uuid"] else: uuid_libs = [] self.add(Extension('_uuid', ['_uuidmodule.c'], - libraries=uuid_libs, - include_dirs=uuid_incs)) + libraries=uuid_libs)) else: self.missing.append('_uuid') |