diff --git a/jpyutil.py b/jpyutil.py index 1f7ede2..83958a7 100644 --- a/jpyutil.py +++ b/jpyutil.py @@ -43,6 +43,7 @@ # This way importing jpyutil does not interfere with logging in other modules logger = logging.getLogger('jpyutil') # Get log level from environment variable JPY_LOG_LEVEL. Default to INFO +os.environ['JPY_LOG_LEVEL'] = 'DEBUG' log_level = os.getenv('JPY_LOG_LEVEL', 'INFO') try: logger.setLevel(getattr(logging, log_level)) @@ -306,6 +307,10 @@ def _find_python_dll_file(fail=False): search_dirs = [sys.prefix] + for name in PYTHON_LIB_DIR_CONFIG_VAR_NAMES: + value = sysconfig.get_config_var(name) + print(f"Checking {name} for Python shared library: {value}") + extra_search_dirs = [sysconfig.get_config_var(name) for name in PYTHON_LIB_DIR_CONFIG_VAR_NAMES] for extra_dir in extra_search_dirs: if extra_dir and extra_dir not in search_dirs and os.path.exists(extra_dir): @@ -328,6 +333,7 @@ def _find_python_dll_file(fail=False): vmaj = str(sys.version_info.major) vmin = str(sys.version_info.minor) + print(f"Python version: {vmaj}.{vmin}") if platform.system() == 'Windows': versions = (vmaj + vmin, vmaj, '') @@ -346,6 +352,7 @@ def _find_python_dll_file(fail=False): if python_dll_path: return python_dll_path + print("try ctypes.util.find_library", PYTHON_LIB_NAME) python_dll_path = ctypes.util.find_library(PYTHON_LIB_NAME) if python_dll_path: logger.debug(