diff -up ./python/geographiclib/CMakeLists.txt.python ./python/geographiclib/CMakeLists.txt
--- ./python/geographiclib/CMakeLists.txt.python 2014-09-28 12:52:48.954838299 -0400
+++ ./python/geographiclib/CMakeLists.txt 2014-09-28 12:55:11.089220128 -0400
@@ -1,9 +1,14 @@
# 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)
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 ()
diff -up ./python/Makefile.am.python ./python/Makefile.am
--- ./python/Makefile.am.python 2014-08-08 10:05:10.000000000 -0400
+++ ./python/Makefile.am 2014-09-28 12:52:05.356187444 -0400
@@ -14,7 +14,7 @@ PYTHON_FILES = \
$(srcdir)/$(PACKAGE)/geodesicline.py \
$(srcdir)/$(PACKAGE)/polygonarea.py
-pythondir=$(libdir)/python/site-packages/$(PACKAGE)
+pythondir=$(libdir)/python2.7/site-packages/$(PACKAGE)
install:
$(INSTALL) -d $(DESTDIR)$(pythondir)