[dist/debian] Disable python version check
authorParichay Kapoor <pk.kapoor@samsung.com>
Mon, 14 Sep 2020 04:47:40 +0000 (13:47 +0900)
committerParichay Kapoor <pk.kapoor@samsung.com>
Mon, 14 Sep 2020 06:43:39 +0000 (15:43 +0900)
Disable python version check as the variable is not found on xenial

**Self evaluation:**
1. Build test: [x]Passed [ ]Failed [ ]Skipped
2. Run test: [x]Passed [ ]Failed [ ]Skipped

Change-Id: I49bfd534e93b0216053a8704cc21eac763e24bc6
Signed-off-by: Parichay Kapoor <pk.kapoor@samsung.com>
cmake/Dependencies.cmake

index daef6bb..64abb55 100644 (file)
@@ -872,10 +872,12 @@ if(BUILD_PYTHON)
   find_package(PythonInterp 3.6 REQUIRED)
   find_package(PythonLibs 3.6)
 
-  if(${PYTHONLIBS_VERSION_STRING} VERSION_LESS 3)
-    message(FATAL_ERROR
-      "Found Python libraries version ${PYTHONLIBS_VERSION_STRING}. Python 2 has reached end-of-life and is no longer supported by PyTorch.")
-  endif()
+  ## Disable this check as the debian build process ensures the python version to over 3.6
+  ## Further, this check does not get PYTHONLIBS_VERSION_STRING variable for xenial on launchpad
+  # if(${PYTHONLIBS_VERSION_STRING} VERSION_LESS 3)
+  #   message(FATAL_ERROR
+  #     "Found Python libraries version ${PYTHONLIBS_VERSION_STRING}. Python 2 has reached end-of-life and is no longer supported by PyTorch.")
+  # endif()
 
   # When building pytorch, we pass this in directly from setup.py, and
   # don't want to overwrite it because we trust python more than cmake