diff options
author | Tomek Mrugalski <tomasz@isc.org> | 2014-06-03 16:34:54 +0200 |
---|---|---|
committer | Tomek Mrugalski <tomasz@isc.org> | 2014-06-03 16:34:54 +0200 |
commit | a28843919086b628724c00e965d6717fb66fa63c (patch) | |
tree | b5e9e241db40a1f06b8edc8a2f879c8249afbeab /src/lib/util/io | |
parent | [3413] setproctitle check removed from configure.ac (diff) | |
download | kea-a28843919086b628724c00e965d6717fb66fa63c.tar.xz kea-a28843919086b628724c00e965d6717fb66fa63c.zip |
[3413] Several build steps no longer require python3
- *.spec files in src/lib/dns/tests/testsdata are now included in dist
- src/lib/util/pyunittests is removed
- src/lib/util/python trimmed down a lot
- fix for missing dhcp6_shutdown_test.sh in src/bin/dhcp6
- many python macros in configure.ac removed
(more of them to be removed in Makefiles)
Diffstat (limited to 'src/lib/util/io')
-rw-r--r-- | src/lib/util/io/Makefile.am | 11 | ||||
-rw-r--r-- | src/lib/util/io/fdshare_python.cc | 98 |
2 files changed, 0 insertions, 109 deletions
diff --git a/src/lib/util/io/Makefile.am b/src/lib/util/io/Makefile.am index 4011bde483..98ba21ec65 100644 --- a/src/lib/util/io/Makefile.am +++ b/src/lib/util/io/Makefile.am @@ -10,14 +10,3 @@ libkea_util_io_la_SOURCES += pktinfo_utilities.h libkea_util_io_la_LIBADD = $(top_builddir)/src/lib/exceptions/libkea-exceptions.la CLEANFILES = *.gcno *.gcda - -pyexec_LTLIBRARIES = libutil_io_python.la -# Python prefers .so, while some OSes (specifically MacOS) use a different -# suffix for dynamic objects. -module is necessary to work this around. -libutil_io_python_la_LDFLAGS = -module -avoid-version -libutil_io_python_la_SOURCES = fdshare_python.cc -libutil_io_python_la_LIBADD = libkea-util-io.la -libutil_io_python_la_CPPFLAGS = $(AM_CPPFLAGS) $(PYTHON_INCLUDES) -# Note: PYTHON_CXXFLAGS may have some -Wno... workaround, which must be -# placed after -Wextra defined in AM_CXXFLAGS -libutil_io_python_la_CXXFLAGS = $(AM_CXXFLAGS) $(PYTHON_CXXFLAGS) diff --git a/src/lib/util/io/fdshare_python.cc b/src/lib/util/io/fdshare_python.cc deleted file mode 100644 index 249f8b08f8..0000000000 --- a/src/lib/util/io/fdshare_python.cc +++ /dev/null @@ -1,98 +0,0 @@ -// Copyright (C) 2010 Internet Systems Consortium, Inc. ("ISC") -// -// Permission to use, copy, modify, and/or distribute this software for any -// purpose with or without fee is hereby granted, provided that the above -// copyright notice and this permission notice appear in all copies. -// -// THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH -// REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -// AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, -// INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM -// LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE -// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -// PERFORMANCE OF THIS SOFTWARE. - -#define PY_SSIZE_T_CLEAN -#include <Python.h> -#include <structmember.h> - -#include <config.h> - -#include "fd_share.h" - - -static PyObject* -fdshare_recv_fd(PyObject*, PyObject* args) { - int sock, fd; - if (!PyArg_ParseTuple(args, "i", &sock)) { - return (NULL); - } - fd = isc::util::io::recv_fd(sock); - return (Py_BuildValue("i", fd)); -} - -static PyObject* -fdshare_send_fd(PyObject*, PyObject* args) { - int sock, fd, result; - if (!PyArg_ParseTuple(args, "ii", &sock, &fd)) { - return (NULL); - } - result = isc::util::io::send_fd(sock, fd); - return (Py_BuildValue("i", result)); -} - -static PyMethodDef fdshare_Methods[] = { - {"send_fd", fdshare_send_fd, METH_VARARGS, ""}, - {"recv_fd", fdshare_recv_fd, METH_VARARGS, ""}, - {NULL, NULL, 0, NULL} /* Sentinel */ -}; - - -static PyModuleDef bind10_fdshare_python = { - { PyObject_HEAD_INIT(NULL) NULL, 0, NULL}, - "bind10_fdshare", - "Python bindings for fdshare", - -1, - fdshare_Methods, - NULL, - NULL, - NULL, - NULL -}; - -PyMODINIT_FUNC -PyInit_libutil_io_python(void) { - PyObject *mod = PyModule_Create(&bind10_fdshare_python); - if (mod == NULL) { - return (NULL); - } - - PyObject* FD_SYSTEM_ERROR = Py_BuildValue("i", - isc::util::io::FD_SYSTEM_ERROR); - if (FD_SYSTEM_ERROR == NULL) { - Py_XDECREF(mod); - return (NULL); - } - int ret = PyModule_AddObject(mod, "FD_SYSTEM_ERROR", FD_SYSTEM_ERROR); - if (ret == -1) { - Py_XDECREF(FD_SYSTEM_ERROR); - Py_XDECREF(mod); - return (NULL); - } - - PyObject* FD_OTHER_ERROR = Py_BuildValue("i", - isc::util::io::FD_OTHER_ERROR); - if (FD_OTHER_ERROR == NULL) { - Py_XDECREF(mod); - return (NULL); - } - ret = PyModule_AddObject(mod, "FD_OTHER_ERROR", FD_OTHER_ERROR); - if (-1 == ret) { - Py_XDECREF(FD_OTHER_ERROR); - Py_XDECREF(mod); - return (NULL); - } - - return (mod); -} - |