diff --git a/cmake/macros/Private.cmake b/cmake/macros/Private.cmake index 6d97fe82e..feffd80c9 100644 --- a/cmake/macros/Private.cmake +++ b/cmake/macros/Private.cmake @@ -118,7 +118,7 @@ function(_install_python LIBRARY_NAME) ${ARGN} ) - set(libPythonPrefix lib/python) + set(libPythonPrefix lib/python2.7/site-packages) _get_python_module_name(${LIBRARY_NAME} LIBRARY_INSTALLNAME) set(files_copied "") @@ -266,7 +266,7 @@ function(_install_pyside_ui_files LIBRARY_NAME) FOLDER "${folder}" ) - set(libPythonPrefix lib/python) + set(libPythonPrefix lib/python2.7/site-packages) _get_python_module_name(${LIBRARY_NAME} LIBRARY_INSTALLNAME) install( @@ -953,7 +953,7 @@ function(_pxr_python_module NAME) # 'from pxr import X'. Additionally, python libraries always install # into the default lib install, not into the third_party subdirectory # or similar. - set(libInstallPrefix "lib/python/pxr/${pyModuleName}") + set(libInstallPrefix "lib/python2.7/site-packages/pxr/${pyModuleName}") # Python modules need to be able to access their corresponding # wrapped library and the install lib directory. diff --git a/cmake/macros/Public.cmake b/cmake/macros/Public.cmake index 0e05c5f37..0342e7b7a 100644 --- a/cmake/macros/Public.cmake +++ b/cmake/macros/Public.cmake @@ -362,7 +362,7 @@ function(pxr_setup_python) string(REPLACE ";" ", " pyModulesStr "${converted}") # Install a pxr __init__.py with an appropriate __all__ - _get_install_dir(lib/python/pxr installPrefix) + _get_install_dir(lib/python2.7/pxr installPrefix) file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/generated_modules_init.py" "__all__ = [${pyModulesStr}]\n") @@ -409,7 +409,7 @@ function (pxr_create_test_module MODULE_NAME) RENAME __init__.py DESTINATION - tests/${tm_INSTALL_PREFIX}/lib/python/${MODULE_NAME} + tests/${tm_INSTALL_PREFIX}/lib/python2.7/${MODULE_NAME} ) endif() if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${plugInfoFile}") @@ -419,7 +419,7 @@ function (pxr_create_test_module MODULE_NAME) RENAME plugInfo.json DESTINATION - tests/${tm_INSTALL_PREFIX}/lib/python/${MODULE_NAME} + tests/${tm_INSTALL_PREFIX}/lib/python2.7/${MODULE_NAME} ) endif() endfunction() # pxr_create_test_module @@ -763,7 +763,7 @@ function(pxr_register_test TEST_NAME) # Ensure that Python imports the Python files built by this build. # On Windows convert backslash to slash and don't change semicolons # to colons. - set(_testPythonPath "${CMAKE_INSTALL_PREFIX}/lib/python;$ENV{PYTHONPATH}") + set(_testPythonPath "${CMAKE_INSTALL_PREFIX}/lib/python2.7;$ENV{PYTHONPATH}") if(WIN32) string(REGEX REPLACE "\\\\" "/" _testPythonPath "${_testPythonPath}") else() diff --git a/pxr/base/plug/testPlug.py b/pxr/base/plug/testPlug.py index 377e66632..776a1317a 100644 --- a/pxr/base/plug/testPlug.py +++ b/pxr/base/plug/testPlug.py @@ -32,7 +32,7 @@ from pxr import Plug, Tf, Gf # Test plugins are installed relative to this script testRoot = os.path.join(os.path.dirname(__file__), 'PlugPlugins') testPluginsDso = testRoot + '/lib' -testPluginsPython = testRoot + '/lib/python' +testPluginsPython = testRoot + '/lib/python2.7/site-packages/pxr' testPluginsDsoSearch = testPluginsDso + '/*/Resources/' testPluginsPythonSearch = testPluginsPython + '/**/' diff --git a/pxr/usdImaging/usdviewq/CMakeLists.txt b/pxr/usdImaging/usdviewq/CMakeLists.txt index 66c5b2091..91c878bf3 100644 --- a/pxr/usdImaging/usdviewq/CMakeLists.txt +++ b/pxr/usdImaging/usdviewq/CMakeLists.txt @@ -80,7 +80,7 @@ pxr_library(usdviewq install(DIRECTORY icons - DESTINATION lib/python/pxr/Usdviewq + DESTINATION lib/python2.7/site-packages/pxr/Usdviewq ) pxr_test_scripts(