Skip to content

Commit

Permalink
Another attempt
Browse files Browse the repository at this point in the history
  • Loading branch information
oysteoh authored and markusdregi committed Oct 16, 2019
1 parent f040094 commit 251a52f
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions python/cmake/Modules/init_python.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,16 @@ macro(init_python target_version)
return()
endif()

if (PYTHON_VERSION_MAJOR EQUAL 3)
if (PYTHON_VERSION_MAJOR EQUAL 3)
if (NOT PYTHON_VERSION_MINOR EQUAL 6)
message(WARNING "libecl for Python 3 is only tested and verified against Python 3.6. Python wrappers are enabled, but not guaranteed to work.")
message(WARNING "Python 3 is only tested and verified against Python 3.6. Found version: ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} - Python wrappers are enabled, but not guaranteed to work.")
endif()
elseif (PYTHON_VERSION_MAJOR EQUAL 2)
if (NOT PYTHON_VERSION_MINOR EQUAL 7)
message(WARNING "Running Python 2, only Python 2.7 is supported. Found version: ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} - Python wrappers not enabled")
set( BUILD_PYTHON OFF PARENT_SCOPE )
return()
endif()
elseif (NOT "${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}" STREQUAL "${target_version}")
message(WARNING "Need Python version ${target_version}, found version: ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR} - Python wrappers not enabled")
set( BUILD_PYTHON OFF PARENT_SCOPE )
return()
endif()

if (EXISTS "/etc/debian_version")
Expand Down

0 comments on commit 251a52f

Please sign in to comment.