make python support more portable, require python3
This commit is contained in:
@ -70,9 +70,9 @@ endif()
|
||||
if(BUILD_SWIG_PYTHON)
|
||||
set_property(SOURCE lammps.i PROPERTY SWIG_MODULE_NAME pylammps)
|
||||
swig_add_library(pylammps TYPE MODULE LANGUAGE python SOURCES lammps.i)
|
||||
find_package(Python REQUIRED COMPONENTS Development)
|
||||
swig_link_libraries(pylammps PRIVATE lammps Python::Python)
|
||||
configure_file(run_python_example.sh run_python_example.sh COPYONLY)
|
||||
find_package(Python3 REQUIRED COMPONENTS Development Interpreter)
|
||||
swig_link_libraries(pylammps PRIVATE lammps Python3::Python)
|
||||
configure_file(run_python_example.sh.in run_python_example.sh @ONLY)
|
||||
endif()
|
||||
|
||||
if(BUILD_SWIG_RUBY)
|
||||
|
||||
@ -60,4 +60,4 @@ PYTHONPATH=${PWD}:${PYTHONPATH-${PWD}}
|
||||
|
||||
export PYTHONPATH
|
||||
|
||||
python example.py
|
||||
@Python3_EXECUTABLE@ example.py
|
||||
Reference in New Issue
Block a user