File tree 2 files changed +20
-0
lines changed
2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -200,6 +200,16 @@ if(PYBIND11_PYTHONLIBS_OVERWRITE OR NOT DEFINED PYTHON_MODULE_DEBUG_POSTFIX)
200
200
endif ()
201
201
if (PYBIND11_PYTHONLIBS_OVERWRITE OR NOT DEFINED PYTHON_MODULE_EXTENSION)
202
202
get_filename_component (PYTHON_MODULE_EXTENSION "${_PYTHON_MODULE_EXT_SUFFIX} " EXT )
203
+ if ((NOT "$ENV{SETUPTOOLS_EXT_SUFFIX} " STREQUAL "" ) AND (NOT "$ENV{SETUPTOOLS_EXT_SUFFIX} "
204
+ STREQUAL "${PYTHON_MODULE_EXTENSION} " ))
205
+ message (
206
+ AUTHOR_WARNING,
207
+ "SETUPTOOLS_EXT_SUFFIX is set to \" $ENV{SETUPTOOLS_EXT_SUFFIX} \" , "
208
+ "but the auto-calculated Python extension suffix is \" ${PYTHON_MODULE_EXTENSION} \" . "
209
+ "This may cause problems when importing the Python extensions. "
210
+ "If you are using cross-compiling Python, you may need to "
211
+ "set PYTHON_MODULE_EXTENSION manually." )
212
+ endif ()
203
213
endif ()
204
214
205
215
# Make sure the Python has the same pointer-size as the chosen compiler
Original file line number Diff line number Diff line change @@ -171,6 +171,16 @@ if(NOT _PYBIND11_CROSSCOMPILING)
171
171
set (PYTHON_MODULE_EXTENSION
172
172
"${_PYTHON_MODULE_EXTENSION} "
173
173
CACHE INTERNAL "" )
174
+ if ((NOT "$ENV{SETUPTOOLS_EXT_SUFFIX} " STREQUAL "" )
175
+ AND (NOT "$ENV{SETUPTOOLS_EXT_SUFFIX} " STREQUAL "${PYTHON_MODULE_EXTENSION} " ))
176
+ message (
177
+ AUTHOR_WARNING,
178
+ "SETUPTOOLS_EXT_SUFFIX is set to \" $ENV{SETUPTOOLS_EXT_SUFFIX} \" , "
179
+ "but the auto-calculated Python extension suffix is \" ${PYTHON_MODULE_EXTENSION} \" . "
180
+ "This may cause problems when importing the Python extensions. "
181
+ "If you are using cross-compiling Python, you may need to "
182
+ "set PYTHON_MODULE_EXTENSION manually." )
183
+ endif ()
174
184
endif ()
175
185
endif ()
176
186
else ()
You can’t perform that action at this time.
0 commit comments