Skip to content
Snippets Groups Projects
Commit 44ebfacf authored by Atkins, Charles Vernon's avatar Atkins, Charles Vernon
Browse files

Fix the borked naming of the python wrapper module

parent 6702da0d
No related branches found
No related tags found
1 merge request!146Fix the borked naming of the python wrapper module
......@@ -23,12 +23,11 @@ if(ADIOS2_HAVE_MPI)
target_link_libraries(adios2py PRIVATE PythonModule::mpi4py)
endif()
find_package(PythonInterp REQUIRED)
set(python_package_dir ${CMAKE_INSTALL_LIBDIR}/python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}/site-packages)
string(REGEX REPLACE "^${PYTHON_PREFIX}/" ""
python_package_dir "${PYTHON_SITE_PACKAGES}"
)
set_target_properties(adios2py PROPERTIES
OUTPUT_NAME adios2
PREFIX "${PYTHON_MODULE_PREFIX}"
SUFFIX "${PYTHON_MODULE_EXTENSION}"
LIBRARY_OUTPUT_DIRECTORY ${ADIOS2_BINARY_DIR}/${python_package_dir}
RUNTIME_OUTPUT_DIRECTORY ${ADIOS2_BINARY_DIR}/${python_package_dir}
)
......
......@@ -85,9 +85,13 @@ elseif(ADIOS2_USE_ADIOS1)
endif()
# Python
# Use the FindPythonLibsNew from pybind11
list(INSERT CMAKE_MODULE_PATH 0
"${ADIOS2_SOURCE_DIR}/thirdparty/pybind11/pybind11/tools"
)
if(ADIOS2_USE_Python STREQUAL AUTO)
if(BUILD_SHARED_LIBS)
find_package(PythonLibs)
find_package(PythonLibsNew)
if(PYTHONLIBS_FOUND)
if(ADIOS2_HAVE_MPI)
find_package(PythonModule COMPONENTS mpi4py mpi4py/mpi4py.h)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment