Blob Blame History Raw
diff -rupN GeographicLib-1.48/python/geographiclib/CMakeLists.txt GeographicLib-1.48-new/python/geographiclib/CMakeLists.txt
--- GeographicLib-1.48/python/geographiclib/CMakeLists.txt	2017-04-09 14:48:27.000000000 +0200
+++ GeographicLib-1.48-new/python/geographiclib/CMakeLists.txt	2017-06-05 15:27:26.339513162 +0200
@@ -1,10 +1,15 @@
 # Install the python files.
 # Probably full-time python users should install the python package from
 # http://pypi.python.org/pypi/geographiclib
+find_package(PythonInterp)
+if (PYTHONINTERP_FOUND)
+  set(PYTHON_VERSION "${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}")
+endif(PYTHONINTERP_FOUND)
+
 file (GLOB PYTHON_FILES [A-Za-z_]*.py)
 file (GLOB TEST_FILES test/[A-Za-z_]*.py)
 if (COMMON_INSTALL_PATH)
-  set (INSTALL_PYTHON_DIR "lib${LIB_SUFFIX}/python/site-packages")
+  set (INSTALL_PYTHON_DIR "lib/python${PYTHON_VERSION}/site-packages")
 else ()
   set (INSTALL_PYTHON_DIR "python")
 endif ()