Be more consistent with init_oracle_client usage.

This commit is contained in:
Anthony Tuininga 2023-01-26 10:51:41 -07:00
parent 9a6a3ae5ee
commit 0990a34bfd
4 changed files with 10 additions and 8 deletions

View File

@ -1,5 +1,5 @@
#------------------------------------------------------------------------------
# Copyright (c) 2022, Oracle and/or its affiliates.
# Copyright (c) 2022, 2023, Oracle and/or its affiliates.
#
# This software is dual-licensed to you under the Universal Permissive License
# (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl and Apache License
@ -133,7 +133,7 @@ ALLOW_POSITIONAL_CONNECT_ARGS = True
# set lib_dir; instead set LD_LIBRARY_PATH or configure ldconfig before running
# Python.
lib_dir = None
if platform.system() == "Darwin":
if platform.system() == "Darwin" and platform.machine() == "x86_64":
lib_dir = os.environ.get("HOME")+"/Downloads/instantclient_19_8"
elif platform.system() == "Windows":
lib_dir = r"C:\oracle\instantclient_19_14"

View File

@ -1,5 +1,5 @@
#------------------------------------------------------------------------------
# Copyright (c) 2017, 2022, Oracle and/or its affiliates.
# Copyright (c) 2017, 2023, Oracle and/or its affiliates.
#
# This software is dual-licensed to you under the Universal Permissive License
# (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl and Apache License
@ -85,6 +85,7 @@
import getpass
import os
import platform
import sys
# default values
@ -164,7 +165,8 @@ def get_admin_connect_string():
return "%s/%s@%s" % (admin_user, admin_password, get_connect_string())
def get_oracle_client():
if sys.platform in ("darwin", "win32"):
if ((platform.system() == "Darwin" and platform.machine() == "x86_64") or
platform.system() == "Windows"):
return get_value("PYO_SAMPLES_ORACLE_CLIENT_PATH",
"Oracle Instant Client Path")

View File

@ -1809,7 +1809,7 @@ if platform.system() == "Windows":
instant_client_dir = r"C:\Oracle\instantclient_19_14"
# On macOS (Intel x86) set the directory to your Instant Client directory
if platform.system() == "Darwin":
if platform.system() == "Darwin" and platform.machine() == "x86_64":
instant_client_dir = os.environ.get("HOME")+"/Downloads/instantclient_19_8"
# You must always call init_oracle_client() to use thick mode
@ -2728,7 +2728,7 @@ import sys</pre>
<hr/>
<h2>License</h2>
<p>Copyright &copy; 2017, 2022, Oracle and/or its affiliates. </p>
<p>Copyright &copy; 2017, 2023, Oracle and/or its affiliates. </p>
<p>This software is dual-licensed to you under the Universal Permissive License
(UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl and Apache License

View File

@ -1,5 +1,5 @@
# ------------------------------------------------------------------------------
# Copyright (c) 2022, Oracle and/or its affiliates.
# Copyright (c) 2022, 2023, Oracle and/or its affiliates.
#
# This software is dual-licensed to you under the Universal Permissive License
# (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl and Apache License
@ -45,7 +45,7 @@ if platform.system() == "Windows":
instant_client_dir = r"C:\Oracle\instantclient_19_14"
# On macOS (Intel x86) set the directory to your Instant Client directory
if platform.system() == "Darwin":
if platform.system() == "Darwin" and platform.machine() == "x86_64":
instant_client_dir = os.environ.get("HOME")+"/Downloads/instantclient_19_8"
# You must always call init_oracle_client() to use thick mode in any platform