diff --git a/CMake/cdat_modules/python_pkg.cmake b/CMake/cdat_modules/python_pkg.cmake index 680cd29921..2234ccc702 100644 --- a/CMake/cdat_modules/python_pkg.cmake +++ b/CMake/cdat_modules/python_pkg.cmake @@ -14,10 +14,10 @@ add_cdat_package(Python ${PYTHON_MAJOR_SRC}.${PYTHON_MINOR_SRC}.${PYTHON_PATCH_S set(CDAT_OS_XTRA_PATH "") set(PYTHON_SITE_PACKAGES_PREFIX ${CMAKE_INSTALL_PREFIX}) -set(PYTHON_SITE_PACKAGES ${PYTHON_SITE_PACKAGES_PREFIX}/lib/python${PYVER}/site-packages) if (APPLE) - set(PYTHON_SITE_PACKAGES ${PYTHON_SITE_PACKAGES_PREFIX}/Library/Frameworks/Python.framework/Versions/${PYVER}/lib/python${PYVER}/site-packages) + set(PYTHON_SITE_PACKAGES_PREFIX ${CMAKE_INSTALL_PREFIX}/Library/Frameworks/Python.framework/Versions/${PYVER}) endif() +set(PYTHON_SITE_PACKAGES ${PYTHON_SITE_PACKAGES_PREFIX}/lib/python${PYVER}/site-packages) set(PYTHONPATH ${PYTHON_SITE_PACKAGES}) if (CDAT_USE_SYSTEM_PYTHON) diff --git a/CMake/cdat_modules_extra/install.py.in b/CMake/cdat_modules_extra/install.py.in index c8c8aa0322..b8be352d86 100644 --- a/CMake/cdat_modules_extra/install.py.in +++ b/CMake/cdat_modules_extra/install.py.in @@ -262,9 +262,15 @@ def get_version(): return Version def get_prefix(): - import os + import os,sys try: - return os.environ["UVCDAT_SETUP_PATH"] + uv_setup_pth = os.environ["UVCDAT_SETUP_PATH"] + if os.uname()[0] == "Darwin": + uv_setup_pth = os.path.join(uv_setup_pth, + "Library","Frameworks","Python.framework","Versions", + "%i.%i" % (sys.version_info.major,sys.version_info.minor) + ) + return uv_setup_pth except KeyError: raise RuntimeError("UVCDAT environment not configured. Please source the setup_runtime script.")