From: Tomofumi Hayashi Date: Wed, 25 Jan 2017 04:53:26 +0000 (+0900) Subject: Change automake python macro to get python path X-Git-Tag: v17.04-rc1~320 X-Git-Url: https://gerrit.fd.io/r/gitweb?a=commitdiff_plain;h=dc90d423a547f3f948953e427b681f2834c8a9d6;p=vpp.git Change automake python macro to get python path 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 --- diff --git a/src/configure.ac b/src/configure.ac index b2234448db7..fbedabf09a8 100644 --- a/src/configure.ac +++ b/src/configure.ac @@ -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"]) diff --git a/src/vpp-api/python/Makefile.am b/src/vpp-api/python/Makefile.am index 16c47627157..cd8db4f6c36 100644 --- a/src/vpp-api/python/Makefile.am +++ b/src/vpp-api/python/Makefile.am @@ -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