mirror of
https://github.com/rdkit/rdkit.git
synced 2026-06-03 21:44:30 +08:00
show an error if attempting to compile with python2 (#2349)
This commit is contained in:
committed by
Brian Kelley
parent
435521453c
commit
fdc8a1ea39
@@ -221,6 +221,11 @@ if(RDK_BUILD_PYTHON_WRAPPERS)
|
||||
if (PYTHONINTERP_FOUND AND NOT Python_ADDITIONAL_VERSIONS)
|
||||
set(Python_ADDITIONAL_VERSIONS "${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}")
|
||||
endif (PYTHONINTERP_FOUND AND NOT Python_ADDITIONAL_VERSIONS)
|
||||
|
||||
if(PYTHON_VERSION_MAJOR EQUAL 2)
|
||||
message(FATAL_ERROR "ERROR: The RDKit no longer supports Python 2.\nIf you have Python 3 installed, you can tell cmake where to find it using the -DPYTHON_EXECUTABLE argument.")
|
||||
endif()
|
||||
|
||||
find_package(PythonLibs)
|
||||
target_include_directories(rdkit_base INTERFACE ${PYTHON_INCLUDE_DIR})
|
||||
find_package(NumPy REQUIRED)
|
||||
|
||||
Reference in New Issue
Block a user