mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-08-31 22:15:23 +00:00
[master] Merged trac5170 (kea-shell install)
This commit is contained in:
@@ -519,6 +519,7 @@ AC_ARG_ENABLE(shell, [AC_HELP_STRING([--enable-shell],
|
|||||||
[enable kea-shell, a text management client for Control Agent [default=no]])],
|
[enable kea-shell, a text management client for Control Agent [default=no]])],
|
||||||
enable_shell=$enableval, enable_shell=no)
|
enable_shell=$enableval, enable_shell=no)
|
||||||
|
|
||||||
|
PKGPYTHONDIR=
|
||||||
if test "x$enable_shell" != xno ; then
|
if test "x$enable_shell" != xno ; then
|
||||||
# If kea-shell is enabled, we really need python. 2.7 or anything newer will do.
|
# If kea-shell is enabled, we really need python. 2.7 or anything newer will do.
|
||||||
# We try to find 3.x first. If not found, we can do with 2.7.
|
# We try to find 3.x first. If not found, we can do with 2.7.
|
||||||
@@ -526,12 +527,20 @@ if test "x$enable_shell" != xno ; then
|
|||||||
if test "x$found" = xno ; then
|
if test "x$found" = xno ; then
|
||||||
AM_PATH_PYTHON([2.7])
|
AM_PATH_PYTHON([2.7])
|
||||||
fi
|
fi
|
||||||
|
# pkgpythondir needs to be expanded
|
||||||
|
PKGPYTHONDIR="$pkgpythondir"
|
||||||
|
OLD=
|
||||||
|
while test "x$OLD" != "x$PKGPYTHONDIR"; do
|
||||||
|
OLD="$PKGPYTHONDIR"
|
||||||
|
eval PKGPYTHONDIR="\"$OLD\""
|
||||||
|
done
|
||||||
else
|
else
|
||||||
PYTHON=no
|
PYTHON=no
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Export to makefiles the info whether we have shell enabled or not
|
# Export to makefiles the info whether we have shell enabled or not
|
||||||
AM_CONDITIONAL(KEA_SHELL, test x$enable_shell != xno)
|
AM_CONDITIONAL(KEA_SHELL, test x$enable_shell != xno)
|
||||||
|
AC_SUBST(PKGPYTHONDIR)
|
||||||
|
|
||||||
# produce PIC unless we disable shared libraries. need this for python bindings.
|
# produce PIC unless we disable shared libraries. need this for python bindings.
|
||||||
if test $enable_shared != "no" -a "X$GXX" = "Xyes"; then
|
if test $enable_shared != "no" -a "X$GXX" = "Xyes"; then
|
||||||
|
@@ -5,10 +5,9 @@ EXTRA_DIST =
|
|||||||
if KEA_SHELL
|
if KEA_SHELL
|
||||||
|
|
||||||
# Kea-shell is enabled, here are proper rules for it.
|
# Kea-shell is enabled, here are proper rules for it.
|
||||||
kea_shell_PYTHON = kea_conn.py kea_connector2.py kea_connector3.py
|
pkgpython_PYTHON = kea_conn.py kea_connector2.py kea_connector3.py
|
||||||
kea_shelldir = @localstatedir@/@PACKAGE@
|
|
||||||
|
|
||||||
bin_SCRIPTS = kea-shell
|
sbin_SCRIPTS = kea-shell
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
@@ -37,12 +36,6 @@ $(man_MANS):
|
|||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
install-data-local:
|
|
||||||
$(mkinstalldirs) $(DESTDIR)/@localstatedir@/@PACKAGE@
|
|
||||||
|
|
||||||
install-data-hook:
|
|
||||||
-chmod 2770 $(DESTDIR)/@localstatedir@/@PACKAGE@
|
|
||||||
|
|
||||||
CLEANDIRS = __pycache__
|
CLEANDIRS = __pycache__
|
||||||
|
|
||||||
clean-local:
|
clean-local:
|
||||||
|
@@ -17,10 +17,13 @@ Text client for Control Agent process
|
|||||||
# that's a stand alone package that requires separate installation. One of
|
# that's a stand alone package that requires separate installation. One of
|
||||||
# the design requirements was to not require any additional packages, so
|
# the design requirements was to not require any additional packages, so
|
||||||
# the code uses standard libraries available in python. Hence two versions.
|
# the code uses standard libraries available in python. Hence two versions.
|
||||||
|
import os
|
||||||
import sys
|
import sys
|
||||||
import signal
|
import signal
|
||||||
import argparse
|
import argparse
|
||||||
|
|
||||||
|
sys.path.append('@PKGPYTHONDIR@')
|
||||||
|
|
||||||
from kea_conn import CARequest # CAResponse
|
from kea_conn import CARequest # CAResponse
|
||||||
|
|
||||||
if sys.version_info[0] == 2:
|
if sys.version_info[0] == 2:
|
||||||
|
Reference in New Issue
Block a user