Remove the old python bindings. They will be replaced with Cython bindings in a subsequent commit.
Signed-off-by: Tom Hromatka <tom.hroma...@oracle.com> --- configure.ac | 13 ------------- src/Makefile.am | 6 +----- src/bindings/Makefile.am | 15 --------------- src/bindings/libcgroup.p | 21 --------------------- src/bindings/tests/stat.py | 35 ----------------------------------- 5 files changed, 1 insertion(+), 89 deletions(-) delete mode 100644 src/bindings/Makefile.am delete mode 100644 src/bindings/libcgroup.p delete mode 100644 src/bindings/tests/stat.py diff --git a/configure.ac b/configure.ac index cbe5cef91b05..7b43a9ec16b6 100644 --- a/configure.ac +++ b/configure.ac @@ -38,18 +38,6 @@ LT_INIT AC_CONFIG_SRCDIR([src]) AC_CONFIG_HEADER([config.h]) -AC_ARG_ENABLE([bindings], - [AS_HELP_STRING([--enable-bindings],[enable python bindings [default=no]])], - [ - if test "x$enableval" = xno; then - with_bindings=false - else - with_bindings=true - fi - ], - [with_bindings = false]) -AM_CONDITIONAL([WITH_BINDINGS], [test x$with_bindings = xtrue]) - # Process command line options AC_ARG_ENABLE([tools], [AS_HELP_STRING([--enable-tools],[compile libcgroup tools [default=yes]])], @@ -208,7 +196,6 @@ AC_CONFIG_FILES([Makefile src/daemon/Makefile src/tools/Makefile src/pam/Makefile - src/bindings/Makefile scripts/Makefile scripts/init.d/cgconfig scripts/init.d/cgred diff --git a/src/Makefile.am b/src/Makefile.am index f7c8903d5c2e..f7f07e4247f8 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -2,11 +2,7 @@ BUILT_SOURCES = parse.c parse.h -if WITH_BINDINGS -BINDINGS_SUBDIR = bindings -endif - -SUBDIRS = . daemon pam tools $(BINDINGS_SUBDIR) +SUBDIRS = . daemon pam tools # generate parse.h from parse.y AM_YFLAGS = -d diff --git a/src/bindings/Makefile.am b/src/bindings/Makefile.am deleted file mode 100644 index d7e32bcd8848..000000000000 --- a/src/bindings/Makefile.am +++ /dev/null @@ -1,15 +0,0 @@ -SUBDIRS = . -AM_CPPFLAGS = -I$(top_srcdir)/include - -lib_LTLIBRARIES = _libcgroup.la -_libcgroup_la_SOURCES = libcgroup.c -_libcgroup_la_LDFLAGS = $(shell python-config --ldflags) -module -avoid-version -_libcgroup_la_CFLAGS = $(shell python-config --cflags) -_libcgroup_la_LIBADD = $(top_builddir)/src/libcgroup.la -SWIG=swig - - -libcgroup.c: libcgroup.p $(top_srcdir)/include/libcgroup.h - cp libcgroup.p libcgroup.i - $(CC) $(INCLUDES) -DSWIG -E $(top_srcdir)/include/libcgroup.h >> libcgroup.i - $(SWIG) -python -o libcgroup.c libcgroup.i diff --git a/src/bindings/libcgroup.p b/src/bindings/libcgroup.p deleted file mode 100644 index ed3f32fd66ad..000000000000 --- a/src/bindings/libcgroup.p +++ /dev/null @@ -1,21 +0,0 @@ -%module libcgroup -%{ -#include "libcgroup.h" -%} - -%include typemaps.i -%include cpointer.i -%pointer_functions(int, intp); -%typemap (in) void** (void *temp) { - void *arg; - if ((arg = PyCObject_AsVoidPtr($input)) != NULL) { - $1 = &arg; - } else - $1 = &temp; -} - -%typemap (argout) void** { - PyObject *obj = PyCObject_FromVoidPtr(*$1, NULL); - $result = PyTuple_Pack(2, $result, obj); -} - diff --git a/src/bindings/tests/stat.py b/src/bindings/tests/stat.py deleted file mode 100644 index 3cfdb2468260..000000000000 --- a/src/bindings/tests/stat.py +++ /dev/null @@ -1,35 +0,0 @@ -#!/usr/bin/python - -from libcgroup import * -from ctypes import * - -ret = cgroup_init() -if (ret != 0): - print cgroup_strerror(ret) - exit(1) - -# -# Add the correct controllers based on the mount point -# -cg_stat = cgroup_stat() -tree_handle = c_void_p() -info = cgroup_file_info() -lvl = new_intp() -ret1, tree_handle = cgroup_walk_tree_begin("memory", "/", 0, tree_handle, info, lvl) -root_len = len(info.full_path) - 1 -while ret1 != ECGEOF: - if (info.type == CGROUP_FILE_TYPE_DIR): - dir = info.full_path[root_len:] - print "\nDirectory %s\n" %(dir) - - p = c_void_p() - ret, p = cgroup_read_stats_begin("memory", dir, p, cg_stat) - while ret != ECGEOF: - print "%s:%s" %(cg_stat.name, cg_stat.value.strip('\n')) - ret, p = cgroup_read_stats_next(p, cg_stat) - - cgroup_read_stats_end(p) - ret1, tree_handle = cgroup_walk_tree_next(0, tree_handle, info, intp_value(lvl)) - -cgroup_walk_tree_end(tree_handle) -delete_intp(lvl) -- 2.31.1 _______________________________________________ Libcg-devel mailing list Libcg-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libcg-devel