[lxc-devel] [lxc/master] python-lxc: use setuptools instead of distutils

GreatFruitOmsk on Github lxc-bot at linuxcontainers.org
Mon May 30 21:24:23 UTC 2016


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 795 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20160530/166dc5d6/attachment.bin>
-------------- next part --------------
From f4d6245dce89b129961f2821da5c67eb35dfa8bb Mon Sep 17 00:00:00 2001
From: Aleksandr Mezin <mezin.alexander at gmail.com>
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 <mezin.alexander at gmail.com>
---
 src/python-lxc/setup.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/python-lxc/setup.py b/src/python-lxc/setup.py
index 58a8d7d..a0960ba 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):


More information about the lxc-devel mailing list