From 9405d8cbc56c8347daf28e2309d5398947bc37b4 Mon Sep 17 00:00:00 2001 From: Jon Dufresne Date: Sat, 15 Sep 2018 16:05:05 -0700 Subject: [PATCH] Drop legacy distutils in setup.py distutils is not recommended for use and unnecessary for modern Python environments. Use only setuptools instead. From https://docs.python.org/3/library/distutils.html: > Most Python users will not want to use this module directly, but > instead use the cross-version tools maintained by the Python Packaging > Authority. In particular, setuptools is an enhanced alternative to > distutils ... > > The recommended pip installer runs all setup.py scripts with > setuptools, even if the script itself only imports distutils. Refer to > the Python Packaging User Guide for more information. --- setup.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/setup.py b/setup.py index 0241e24a..f1a50c8e 100644 --- a/setup.py +++ b/setup.py @@ -32,10 +32,7 @@ import os import sys import re import subprocess -try: - from setuptools import setup, Extension -except ImportError: - from distutils.core import setup, Extension +from setuptools import setup, Extension from distutils.command.build_ext import build_ext from distutils.sysconfig import get_python_inc from distutils.ccompiler import get_default_compiler