mirror of
https://github.com/NGSolve/netgen.git
synced 2024-11-11 16:49:16 +05:00
some more missing PYTHON -> Python3 renamings
This commit is contained in:
parent
f873de3e3b
commit
5c87a797ff
@ -341,7 +341,7 @@ if (USE_MPI)
|
||||
target_compile_definitions(netgen_metis INTERFACE METIS )
|
||||
|
||||
if(USE_MPI4PY AND USE_PYTHON)
|
||||
execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "import mpi4py;print(mpi4py.get_include())" OUTPUT_VARIABLE mpi4py_path OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
execute_process(COMMAND ${Python3_EXECUTABLE} -c "import mpi4py;print(mpi4py.get_include())" OUTPUT_VARIABLE mpi4py_path OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
find_path(MPI4PY_INCLUDE_DIR mpi4py.h HINTS ${mpi4py_path}/mpi4py NO_DEFAULT_PATH REQUIRED)
|
||||
target_include_directories(netgen_metis INTERFACE ${MPI4PY_INCLUDE_DIR})
|
||||
target_compile_definitions(netgen_metis INTERFACE NG_MPI4PY )
|
||||
|
@ -38,7 +38,7 @@ set(NETGEN_OCC_LIBRARIES_BIN "@OpenCASCADE_BINARY_DIR@")
|
||||
set(NETGEN_OCC_LIBRARIES "@OCC_LIBRARIES@")
|
||||
set(NETGEN_OCC_LIBRARY_DIR "@OpenCASCADE_LIBRARY_DIR@")
|
||||
set(NETGEN_OPENGL_LIBRARIES "@OPENGL_LIBRARIES@")
|
||||
set(NETGEN_PYTHON_EXECUTABLE "@PYTHON_EXECUTABLE@")
|
||||
set(NETGEN_PYTHON_EXECUTABLE "@Python3_EXECUTABLE@")
|
||||
set(NETGEN_PYTHON_INCLUDE_DIRS "@Python3_INCLUDE_DIRS@")
|
||||
set(NETGEN_PYTHON_LIBRARIES "@Python3_LIBRARIES@")
|
||||
set(NETGEN_TCL_INCLUDE_PATH "@TCL_INCLUDE_PATH@")
|
||||
|
@ -7,7 +7,7 @@ else(LINUX)
|
||||
if(SKBUILD)
|
||||
# we are building a pip package - download the tcl/tk sources matching the tkinter version (for private headers not shipped with python)
|
||||
|
||||
execute_process(COMMAND ${PYTHON_EXECUTABLE} -c
|
||||
execute_process(COMMAND ${Python3_EXECUTABLE} -c
|
||||
"import tkinter;print(tkinter.Tcl().eval('info patchlevel').replace('.','-'))"
|
||||
OUTPUT_VARIABLE PYTHON_TCL_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
@ -39,7 +39,7 @@ set(TK_INCLUDE_PATH ${TK_DIR}/generic)
|
||||
list(APPEND NETGEN_DEPENDENCIES project_tcl project_tk)
|
||||
|
||||
if(APPLE OR WIN32)
|
||||
execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "import sys; print(sys.prefix)" OUTPUT_VARIABLE PYTHON_PREFIX OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
execute_process(COMMAND ${Python3_EXECUTABLE} -c "import sys; print(sys.prefix)" OUTPUT_VARIABLE PYTHON_PREFIX OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
file(TO_CMAKE_PATH ${PYTHON_PREFIX} PYTHON_PREFIX)
|
||||
|
||||
set(tcl_find_args
|
||||
|
@ -26,13 +26,13 @@ install(FILES
|
||||
|
||||
# build stub files for pybind11 packages
|
||||
if(BUILD_STUB_FILES)
|
||||
execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "import pybind11_stubgen; print(pybind11_stubgen.__file__)" OUTPUT_VARIABLE stubgen_path RESULT_VARIABLE pybind11_stubgen)
|
||||
execute_process(COMMAND ${Python3_EXECUTABLE} -c "import pybind11_stubgen; print(pybind11_stubgen.__file__)" OUTPUT_VARIABLE stubgen_path RESULT_VARIABLE pybind11_stubgen)
|
||||
if(pybind11_stubgen AND NOT ${pybind11_stubgen} EQUAL 0)
|
||||
message(WARNING "pybind11-stubgen not found, if you want to create stub files
|
||||
for better autocompletion support install it with pip.")
|
||||
else()
|
||||
message("-- Found pybind11-stubgen: ${stubgen_path}")
|
||||
install(CODE "execute_process(COMMAND ${PYTHON_EXECUTABLE} -m pybind11_stubgen --no-setup-py --ignore-invalid=all netgen)")
|
||||
install(CODE "execute_process(COMMAND ${Python3_EXECUTABLE} -m pybind11_stubgen --no-setup-py --ignore-invalid=all netgen)")
|
||||
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/../stubs/netgen-stubs/ DESTINATION ${NG_INSTALL_DIR_PYTHON}/netgen/ COMPONENT netgen)
|
||||
endif()
|
||||
endif(BUILD_STUB_FILES)
|
||||
|
@ -52,8 +52,8 @@ NETGEN_VERSION_TWEAK = "@NETGEN_VERSION_TWEAK@"
|
||||
NETGEN_VERSION_PATCH = "@NETGEN_VERSION_PATCH@"
|
||||
NETGEN_VERSION_HASH = "@NETGEN_VERSION_HASH@"
|
||||
|
||||
PYTHON_VERSION = "@PYTHON_VERSION@"
|
||||
PYTHON_VERSION_MAJOR = "@PYTHON_VERSION_MAJOR@"
|
||||
PYTHON_VERSION_MINOR = "@PYTHON_VERSION_MINOR@"
|
||||
PYTHON_VERSION = "@Python3_VERSION@"
|
||||
PYTHON_VERSION_MAJOR = "@Python3_VERSION_MAJOR@"
|
||||
PYTHON_VERSION_MINOR = "@Python3_VERSION_MINOR@"
|
||||
|
||||
version = NETGEN_VERSION_GIT
|
||||
|
@ -1,8 +1,8 @@
|
||||
if(USE_PYTHON)
|
||||
add_test(NAME pytest COMMAND ${PYTHON_EXECUTABLE} -m pytest WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
add_custom_target(pytest ${PYTHON_EXECUTABLE} -m pytest WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
add_test(NAME pytest COMMAND ${Python3_EXECUTABLE} -m pytest WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
add_custom_target(pytest ${Python3_EXECUTABLE} -m pytest WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
set_tests_properties ( pytest PROPERTIES TIMEOUT 1800 )
|
||||
if(USE_MPI AND USE_MPI4PY)
|
||||
add_test(NAME pytest-mpi COMMAND ${MPIEXEC_EXECUTABLE} --allow-run-as-root -np 4 ${PYTHON_EXECUTABLE} -m pytest --with-mpi test_mpi4py.py WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
add_test(NAME pytest-mpi COMMAND ${MPIEXEC_EXECUTABLE} --allow-run-as-root -np 4 ${Python3_EXECUTABLE} -m pytest --with-mpi test_mpi4py.py WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
endif(USE_MPI AND USE_MPI4PY)
|
||||
endif(USE_PYTHON)
|
||||
|
Loading…
Reference in New Issue
Block a user