--- ./scripts/CMakeLists.txt.orig 2012-10-03 19:08:52.000000000 +0000 +++ ./scripts/CMakeLists.txt 2012-10-29 23:15:24.219796263 +0000 @@ -50,6 +50,7 @@ if(PYTHONLIBS_FOUND AND PYTHONINTERP_FOUND) set(DO_PYTHON_BINDINGS ON BOOL) + set(PYTHON_SITE_PACKAGES_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/site-packages CACHE PATH "The directory where python modules will be installed to.") message(STATUS "Python bindings will be compiled") endif(PYTHONLIBS_FOUND AND PYTHONINTERP_FOUND) @@ -91,9 +92,9 @@ PREFIX "" SUFFIX .so ) add_dependencies(bindings_python openbabel) - install(TARGETS bindings_python LIBRARY DESTINATION ${LIB_INSTALL_DIR}) - install(FILES ${openbabel_SOURCE_DIR}/scripts/python/openbabel.py DESTINATION ${LIB_INSTALL_DIR}) - install(FILES ${openbabel_SOURCE_DIR}/scripts/python/pybel.py DESTINATION ${LIB_INSTALL_DIR}) + install(TARGETS bindings_python LIBRARY DESTINATION ${PYTHON_SITE_PACKAGES_INSTALL_DIR}) + install(FILES ${openbabel_SOURCE_DIR}/scripts/python/openbabel.py DESTINATION ${PYTHON_SITE_PACKAGES_INSTALL_DIR}) + install(FILES ${openbabel_SOURCE_DIR}/scripts/python/pybel.py DESTINATION ${PYTHON_SITE_PACKAGES_INSTALL_DIR}) else(NOT WIN32) set_target_properties(bindings_python PROPERTIES OUTPUT_NAME _openbabel