فهرست منبع

[HUE-5930] [Backend] Make cx_Oracle compilation optional in cx_Oracle 5.2.1

(cherry picked from commit a73ca317c223b5c966dd7648beff6eb8365ce293)
Prakash Ranade 8 سال پیش
والد
کامیت
6a0f7e5
1فایلهای تغییر یافته به همراه3 افزوده شده و 3 حذف شده
  1. 3 3
      desktop/core/ext-py/cx_Oracle-5.2.1/setup.py

+ 3 - 3
desktop/core/ext-py/cx_Oracle-5.2.1/setup.py

@@ -154,7 +154,7 @@ else:
 instantClientRPMLib = None
 
 # try to determine the Oracle home
-userOracleHome = os.environ.get("ORACLE_HOME")
+userOracleHome = os.environ.get("ORACLE_HOME", os.environ.get("ORACLE_INSTANTCLIENT_HOME"))
 if userOracleHome is not None:
     if not CheckOracleHome(userOracleHome):
         messageFormat = "Oracle home (%s) does not refer to an " \
@@ -167,8 +167,8 @@ else:
     if oracleHome is None and sys.platform.startswith("linux"):
         instantClientRPMLib = FindInstantClientRPMLib()
     if oracleHome is None:
-        raise DistutilsSetupError("cannot locate an Oracle software " \
-                "installation")
+        print >>sys.stderr, "cannot locate an Oracle software installation. skipping"
+        sys.exit(0)
 
 # define some variables
 if sys.platform == "win32":