mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-25 14:45:12 +00:00
fix: match new extension discovery with changes to classic discovery (#2640)
* fix: match new extension discovery with changes to classic discovery Followup to #2638 - this was fixed in 2.6.0, but only for classic Python * fix: followup to avoid warnings
This commit is contained in:
parent
6d4854a501
commit
3e4d54bc01
@ -115,7 +115,7 @@ print('.'.join(str(v) for v in sys.version_info));
|
|||||||
print(sys.prefix);
|
print(sys.prefix);
|
||||||
print(s.get_python_inc(plat_specific=True));
|
print(s.get_python_inc(plat_specific=True));
|
||||||
print(s.get_python_lib(plat_specific=True));
|
print(s.get_python_lib(plat_specific=True));
|
||||||
print(s.get_config_var('SO') or s.get_config_var('EXT_SUFFIX'));
|
print(s.get_config_var('EXT_SUFFIX') or s.get_config_var('SO'));
|
||||||
print(hasattr(sys, 'gettotalrefcount')+0);
|
print(hasattr(sys, 'gettotalrefcount')+0);
|
||||||
print(struct.calcsize('@P'));
|
print(struct.calcsize('@P'));
|
||||||
print(s.get_config_var('LDVERSION') or s.get_config_var('VERSION'));
|
print(s.get_config_var('LDVERSION') or s.get_config_var('VERSION'));
|
||||||
|
@ -95,8 +95,9 @@ endif()
|
|||||||
# required for PyPy3 (as of 7.3.1)
|
# required for PyPy3 (as of 7.3.1)
|
||||||
if(NOT DEFINED PYTHON_MODULE_EXTENSION)
|
if(NOT DEFINED PYTHON_MODULE_EXTENSION)
|
||||||
execute_process(
|
execute_process(
|
||||||
COMMAND "${${_Python}_EXECUTABLE}" "-c"
|
COMMAND
|
||||||
"from distutils import sysconfig; print(sysconfig.get_config_var('SO'))"
|
"${${_Python}_EXECUTABLE}" "-c"
|
||||||
|
"from distutils import sysconfig as s;print(s.get_config_var('EXT_SUFFIX') or s.get_config_var('SO'))"
|
||||||
OUTPUT_VARIABLE _PYTHON_MODULE_EXTENSION
|
OUTPUT_VARIABLE _PYTHON_MODULE_EXTENSION
|
||||||
ERROR_VARIABLE _PYTHON_MODULE_EXTENSION_ERR
|
ERROR_VARIABLE _PYTHON_MODULE_EXTENSION_ERR
|
||||||
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
|
Loading…
Reference in New Issue
Block a user