@@ -48,9 +48,7 @@ def _search_directories(get_config, base_executable) -> list[str]:
4848 # On MacOS, the LDLIBRARY may be a relative path under /Library/Frameworks,
4949 # such as "Python.framework/Versions/3.12/Python", not a file under the
5050 # LIBDIR/LIBPL directory, so include PYTHONFRAMEWORKPREFIX.
51- lib_dirs = [
52- get_config (x ) for x in ("PYTHONFRAMEWORKPREFIX" , "LIBPL" , "LIBDIR" )
53- ]
51+ lib_dirs = [get_config (x ) for x in ("PYTHONFRAMEWORKPREFIX" , "LIBPL" , "LIBDIR" )]
5452
5553 # On Debian, with multiarch enabled, prior to Python 3.10, `LIBDIR` didn't
5654 # tell the location of the libs, just the base directory. The `MULTIARCH`
@@ -67,8 +65,8 @@ def _search_directories(get_config, base_executable) -> list[str]:
6765
6866 if not _IS_DARWIN :
6967 for exec_dir in (
70- os .path .dirname (base_executable ) if base_executable else None ,
71- get_config ("BINDIR" ),
68+ os .path .dirname (base_executable ) if base_executable else None ,
69+ get_config ("BINDIR" ),
7270 ):
7371 if not exec_dir :
7472 continue
@@ -122,7 +120,8 @@ def _search_library_names(get_config, version, abi_flags) -> list[str]:
122120 #
123121 # A typical LIBRARY is 'libpythonX.Y.a' on Linux.
124122 lib_names = [
125- get_config (x ) for x in (
123+ get_config (x )
124+ for x in (
126125 "LDLIBRARY" ,
127126 "INSTSONAME" ,
128127 "PY3LIBRARY" ,
@@ -167,8 +166,7 @@ def _get_python_library_info(base_executable) -> dict[str, Any]:
167166 abi_flags = _get_abi_flags (config_vars .get )
168167
169168 search_directories = _search_directories (config_vars .get , base_executable )
170- search_libnames = _search_library_names (config_vars .get , version ,
171- abi_flags )
169+ search_libnames = _search_library_names (config_vars .get , version , abi_flags )
172170
173171 # Used to test whether the library is an abi3 library or a full api library.
174172 abi3_libraries = _default_library_names (sys .version_info .major , abi_flags )
@@ -221,10 +219,10 @@ def _get_python_library_info(base_executable) -> dict[str, Any]:
221219 # Additional DLLs are needed on Windows to link properly.
222220 dlls = []
223221 if _IS_WINDOWS :
224- dlls .extend (
225- glob .glob (os .path .join (os .path .dirname (base_executable ), "*.dll" )))
222+ dlls .extend (glob .glob (os .path .join (os .path .dirname (base_executable ), "*.dll" )))
226223 dlls = [
227- x for x in dlls
224+ x
225+ for x in dlls
228226 if x not in dynamic_libraries and x not in abi_dynamic_libraries
229227 ]
230228
0 commit comments