From f6ab2204b7b2e5f114092ea312181a9aab314186 Mon Sep 17 00:00:00 2001 From: Aleksandr Mezin Date: Tue, 31 May 2016 03:13:24 +0600 Subject: [PATCH] python-lxc: use setuptools instead of distutils setuptools is recommended by Python Packaging Guide https://python-packaging-user-guide.readthedocs.io/en/latest/current/ It contains some useful extensions like 'develop' command. Also it is required for building wheels AFAIK. The only downside is an extra build-time dependency. setuptools are packaged in both Debian and Ubuntu (python3-setuptools), as well as other major distros, so it shouldn't be an issue, I think. Signed-off-by: Aleksandr Mezin --- .travis.yml | 2 +- lxc.spec.in | 1 + src/python-lxc/setup.py | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index fe5f3ebc5..294e06cd4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,7 @@ compiler: before_install: - sudo add-apt-repository ppa:ubuntu-lxc/daily -y - sudo apt-get update -qq - - sudo apt-get install -qq libapparmor-dev libcap-dev libseccomp-dev python3-dev docbook2x libgnutls-dev liblua5.2-dev libselinux1-dev libcgmanager-dev + - sudo apt-get install -qq libapparmor-dev libcap-dev libseccomp-dev python3-dev python3-setuptools docbook2x libgnutls-dev liblua5.2-dev libselinux1-dev libcgmanager-dev script: - ./autogen.sh - mkdir build diff --git a/lxc.spec.in b/lxc.spec.in index 9cc8dc565..1c3e08a32 100644 --- a/lxc.spec.in +++ b/lxc.spec.in @@ -97,6 +97,7 @@ BuildRequires: libseccomp-devel %if %{with_python} Requires: python3 BuildRequires: python3-devel +BuildRequires: python3-setuptools %endif %description diff --git a/src/python-lxc/setup.py b/src/python-lxc/setup.py index 58a8d7d0a..a0960bae9 100644 --- a/src/python-lxc/setup.py +++ b/src/python-lxc/setup.py @@ -25,8 +25,8 @@ import os import subprocess -from distutils.core import setup, Extension -from distutils.command.build_ext import build_ext as BuildExtCommand +from setuptools import setup, Extension +from setuptools.command.build_ext import build_ext as BuildExtCommand class LxcBuildExtCommand(BuildExtCommand): -- 2.47.2