File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -63,10 +63,15 @@ def get_install_paths():
6363 return paths , install_paths
6464
6565def links_against_libpython ():
66- from distutils .core import Distribution , Extension
67- cmd = Distribution ().get_command_obj ('build_ext' )
68- cmd .ensure_finalized ()
69- return bool (cmd .get_libraries (Extension ('dummy' , [])))
66+ # on versions supporting python-embed.pc, this is the non-embed lib
67+ if sys .version_info >= (3 , 12 ):
68+ variables = sysconfig .get_config_vars ()
69+ return bool (variables .get ('LIBPYTHON' , True ))
70+ else :
71+ from distutils .core import Distribution , Extension
72+ cmd = Distribution ().get_command_obj ('build_ext' )
73+ cmd .ensure_finalized ()
74+ return bool (cmd .get_libraries (Extension ('dummy' , [])))
7075
7176def main ():
7277 variables = sysconfig .get_config_vars ()
You can’t perform that action at this time.
0 commit comments