Change automake python macro to get python path 50/4850/3
authorTomofumi Hayashi <tohayash@redhat.com>
Wed, 25 Jan 2017 04:53:26 +0000 (13:53 +0900)
committerOle Trøan <otroan@employees.org>
Thu, 26 Jan 2017 08:33:52 +0000 (08:33 +0000)
Previously install path for python binding is fixed, as
lib/python2.7/site-packages and other version/enironement is not
supported. This change introduces automake's python macro and gets
the install path from environment dynamically.

Change-Id: I6535107d4bde61976fbdf5392d460beb1049658e
Signed-off-by: Tomofumi Hayashi <tohayash@redhat.com>
src/configure.ac
src/vpp-api/python/Makefile.am

index b223444..fbedabf 100644 (file)
@@ -10,6 +10,7 @@ AC_PROG_CC
 AM_PROG_AS
 AM_PROG_LIBTOOL
 AC_PROG_YACC
+AM_PATH_PYTHON
 
 AM_CONDITIONAL([CROSSCOMPILE], [test "$cross_compiling" == "yes"])
 
index 16c4762..cd8db4f 100644 (file)
@@ -41,7 +41,8 @@ libpneum_la_CPPFLAGS =
 # TODO: Support both Python 2 and 3.
 install-exec-local:
        cd $(srcdir);                                                   \
-       mkdir -p $(prefix)/lib/python2.7/site-packages;                 \
+       mkdir -p $(pythondir);                                          \
+       mkdir -p $(pyexecdir);                                          \
        PYTHONUSERBASE=$(prefix)                                        \
        python setup.py build_ext -L $(libdir)                          \
        -I $(prefix)/include/ install --user