Skip to content

Commit

Permalink
tree-wide: remove python3 bindings
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
  • Loading branch information
Christian Brauner committed Feb 28, 2018
1 parent b52a5be commit e144a06
Show file tree
Hide file tree
Showing 13 changed files with 1 addition and 3,062 deletions.
4 changes: 0 additions & 4 deletions .gitignore
Expand Up @@ -67,10 +67,6 @@ src/lxc/version.h
src/lxc/cmd/lxc-checkconfig
src/lxc/cmd/lxc-update-config

src/python-lxc/build/
src/python-lxc/lxc/__pycache__/
src/python-lxc/lxc.egg-info/

src/tests/lxc-test-device-add-remove
src/tests/lxc-test-attach
src/tests/lxc-test-apparmor
Expand Down
4 changes: 0 additions & 4 deletions Makefile.am
Expand Up @@ -13,10 +13,6 @@ EXTRA_DIST = \

RPMARGS =

if ENABLE_PYTHON
RPMARGS += --with python
endif

pcdatadir = $(libdir)/pkgconfig
pcdata_DATA = lxc.pc

Expand Down
27 changes: 0 additions & 27 deletions configure.ac
Expand Up @@ -363,29 +363,6 @@ AC_ARG_ENABLE([examples],
[], [enable_examples=yes])
AM_CONDITIONAL([ENABLE_EXAMPLES], [test "x$enable_examples" = "xyes"])

# Python3 module and scripts
AC_ARG_ENABLE([python],
[AC_HELP_STRING([--enable-python], [enable python binding [default=auto]])],
[], [enable_python=auto])

if test "x$enable_python" = "xauto"; then
PKG_CHECK_MODULES([PYTHONDEV], [python3 >= 3.2],[enable_python=yes],[enable_python=no])
if test "$CC" = "clang"; then
enable_python=no
fi
fi

if test "x$enable_python" = "xyes" && test "$CC" = "clang"; then
AC_MSG_ERROR([Python3 is incompatible with the clang compiler])
fi

AM_CONDITIONAL([ENABLE_PYTHON], [test "x$enable_python" = "xyes"])

AM_COND_IF([ENABLE_PYTHON],
[AM_PATH_PYTHON([3.2], [], [AC_MSG_ERROR([You must install python3])])
PKG_CHECK_MODULES([PYTHONDEV], [python3 >= 3.2],[],[AC_MSG_ERROR([You must install python3-dev])])
AC_DEFINE_UNQUOTED([ENABLE_PYTHON], 1, [Python3 is available])])

# Enable dumping stack traces
AC_ARG_ENABLE([mutex-debugging],
[AC_HELP_STRING([--enable-mutex-debugging], [Makes mutexes to report error and provide stack trace [default=no]])],
Expand Down Expand Up @@ -894,7 +871,6 @@ AC_CONFIG_FILES([
src/lxc/cmd/lxc-checkconfig
src/lxc/cmd/lxc-update-config
src/lxc/version.h
src/python-lxc/Makefile
src/tests/Makefile
src/tests/lxc-test-usernic
Expand Down Expand Up @@ -957,9 +933,6 @@ PAM:
- PAM module: $enable_pam
- cgroup PAM module: $pamdir

Bindings:
- python3: $enable_python

Documentation:
- examples: $enable_examples
- API documentation: $enable_api_docs
Expand Down
7 changes: 0 additions & 7 deletions doc/ko/Makefile.am
Expand Up @@ -41,13 +41,6 @@ man_MANS = \
\
lxc.7

if ENABLE_DEPRECATED
man_MANS += lxc-clone.1
if ENABLE_PYTHON
man_MANS += lxc-start-ephemeral.1
endif
endif

%.1 : %.sgml
$(db2xman) --encoding=UTF-8 $<
test "$(shell basename $@)" != "$@" && mv $(shell basename $@) $@ || true
Expand Down
15 changes: 0 additions & 15 deletions lxc.spec.in
Expand Up @@ -20,8 +20,6 @@
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

%global with_python %{?_with_python: 1} %{?!_with_python: 0}

# Set with_systemd on distros that use it, so we can install the service
# file, otherwise the sysvinit script will be installed
%if 0%{?fedora} >= 14 || 0%{?rhel} >= 7 || 0%{?suse_version} >= 1210
Expand Down Expand Up @@ -93,12 +91,6 @@ BuildRequires: libseccomp-devel
%endif
%endif

%if %{with_python}
Requires: python3
BuildRequires: python3-devel
BuildRequires: python3-setuptools
%endif

%description
Containers are insulated areas inside a system, which have their own namespace
for filesystem, network, PID, IPC, CPU and memory allocation and which can be
Expand Down Expand Up @@ -127,9 +119,6 @@ development of the Linux containers.
%setup -q -n %{name}-%{version}%{?beta_dot}
%build
PATH=$PATH:/usr/sbin:/sbin %configure $args \
%if %{with_python}
--enable-python \
%endif
%if "x%{_unitdir}" != "x"
--with-systemdsystemunitdir=%{_unitdir} \
%endif
Expand Down Expand Up @@ -266,10 +255,6 @@ fi
%attr(555,root,root) %{_libexecdir}/%{name}/lxc-containers
%endif

%if %{with_python}
%{python3_sitearch}/*
%endif

%files devel
%defattr(-,root,root)
%{_includedir}/%{name}/*
Expand Down
2 changes: 1 addition & 1 deletion src/Makefile.am
@@ -1 +1 @@
SUBDIRS = lxc tests python-lxc
SUBDIRS = lxc tests
35 changes: 0 additions & 35 deletions src/python-lxc/Makefile.am

This file was deleted.

207 changes: 0 additions & 207 deletions src/python-lxc/examples/api_test.py

This file was deleted.

0 comments on commit e144a06

Please sign in to comment.