Merge pull request #292 from coreemu/bug/290-fix-default-pythonpath
fix #290 use pythondir var as base for setting PYTHONLIBDIR
This commit is contained in:
commit
6886746711
4 changed files with 16 additions and 15 deletions
|
@ -54,6 +54,13 @@ if test "x$enable_python" = "xyes" ; then
|
||||||
else
|
else
|
||||||
want_python=no
|
want_python=no
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
AC_ARG_ENABLE([python3],
|
||||||
|
[AS_HELP_STRING([--enable-python3],
|
||||||
|
[sets python3 flag for building packages])],
|
||||||
|
[enable_python3=yes], [enable_python3=no])
|
||||||
|
AM_CONDITIONAL([PYTHON3], [test "x$enable_python3" == "xyes"])
|
||||||
|
|
||||||
AC_ARG_ENABLE([daemon],
|
AC_ARG_ENABLE([daemon],
|
||||||
[AS_HELP_STRING([--enable-daemon[=ARG]],
|
[AS_HELP_STRING([--enable-daemon[=ARG]],
|
||||||
[build and install the daemon with Python modules
|
[build and install the daemon with Python modules
|
||||||
|
@ -110,7 +117,6 @@ if test "x$enable_daemon" = "xyes"; then
|
||||||
AC_CHECK_FUNCS([atexit dup2 gettimeofday memset socket strerror uname])
|
AC_CHECK_FUNCS([atexit dup2 gettimeofday memset socket strerror uname])
|
||||||
|
|
||||||
AM_PATH_PYTHON(2.7)
|
AM_PATH_PYTHON(2.7)
|
||||||
AM_CONDITIONAL([PYTHON3], [test "x$PYTHON" == "xpython3"])
|
|
||||||
AS_IF([$PYTHON -m grpc_tools.protoc -h &> /dev/null], [], [AC_MSG_ERROR([please install python grpcio-tools])])
|
AS_IF([$PYTHON -m grpc_tools.protoc -h &> /dev/null], [], [AC_MSG_ERROR([please install python grpcio-tools])])
|
||||||
|
|
||||||
AC_CHECK_PROG(brctl_path, brctl, $as_dir, no, $SEARCHPATH)
|
AC_CHECK_PROG(brctl_path, brctl, $as_dir, no, $SEARCHPATH)
|
||||||
|
@ -157,6 +163,7 @@ if test "x$enable_daemon" = "xyes"; then
|
||||||
CFLAGS=$CFLAGS_save
|
CFLAGS=$CFLAGS_save
|
||||||
CPPFLAGS=$CPPFLAGS_save
|
CPPFLAGS=$CPPFLAGS_save
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ test "x$enable_daemon" = "xyes" || test "x$enable_vnodedonly" = "xyes" ] ; then
|
if [ test "x$enable_daemon" = "xyes" || test "x$enable_vnodedonly" = "xyes" ] ; then
|
||||||
want_linux_netns=yes
|
want_linux_netns=yes
|
||||||
PKG_CHECK_MODULES(libev, libev,
|
PKG_CHECK_MODULES(libev, libev,
|
||||||
|
|
|
@ -14,11 +14,7 @@ if WANT_DOCS
|
||||||
DOCS = doc
|
DOCS = doc
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if PYTHON3
|
PYTHONLIBDIR=$(subst site-packages,dist-packages,$(pythondir))
|
||||||
PYTHONLIBDIR=$(libdir)/python3/dist-packages
|
|
||||||
else
|
|
||||||
PYTHONLIBDIR=$(pythondir)
|
|
||||||
endif
|
|
||||||
|
|
||||||
SUBDIRS = proto $(DOCS)
|
SUBDIRS = proto $(DOCS)
|
||||||
|
|
||||||
|
|
|
@ -249,7 +249,7 @@ sudo yum -y install automake gcc python-devel libev-devel tk
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
./bootstrap.sh
|
./bootstrap.sh
|
||||||
# use python2 or python3 depending on desired version
|
# $VERSION should be path to python2/3
|
||||||
PYTHON=$VERSION ./configure
|
PYTHON=$VERSION ./configure
|
||||||
make
|
make
|
||||||
sudo make install
|
sudo make install
|
||||||
|
@ -268,7 +268,7 @@ sudo apt install python3-sphinx
|
||||||
sudo yum install python3-sphinx
|
sudo yum install python3-sphinx
|
||||||
|
|
||||||
./bootstrap.sh
|
./bootstrap.sh
|
||||||
# use python2 or python3 depending on desired version
|
# $VERSION should be path to python2/3
|
||||||
PYTHON=$VERSION ./configure
|
PYTHON=$VERSION ./configure
|
||||||
make doc
|
make doc
|
||||||
```
|
```
|
||||||
|
@ -282,8 +282,10 @@ Build package commands, DESTDIR is used to make install into and then for packag
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
./bootstrap.sh
|
./bootstrap.sh
|
||||||
# use python2 or python3 depending on desired version
|
# for python2
|
||||||
PYTHON=$VERSION ./configure
|
PYTHON=python2 ./configure
|
||||||
|
# for python3
|
||||||
|
PYTHON=python3 ./configure --enable-python3
|
||||||
make
|
make
|
||||||
mkdir /tmp/core-build
|
mkdir /tmp/core-build
|
||||||
make fpm DESTDIR=/tmp/core-build
|
make fpm DESTDIR=/tmp/core-build
|
||||||
|
|
|
@ -9,11 +9,7 @@
|
||||||
|
|
||||||
if WANT_PYTHON
|
if WANT_PYTHON
|
||||||
|
|
||||||
if PYTHON3
|
PYTHONLIBDIR=$(subst site-packages,dist-packages,$(pythondir))
|
||||||
PYTHONLIBDIR=$(libdir)/python3/dist-packages
|
|
||||||
else
|
|
||||||
PYTHONLIBDIR=$(pythondir)
|
|
||||||
endif
|
|
||||||
|
|
||||||
SETUPPY = setup.py
|
SETUPPY = setup.py
|
||||||
SETUPPYFLAGS = -v
|
SETUPPYFLAGS = -v
|
||||||
|
|
Loading…
Add table
Reference in a new issue