diff --git a/pythran/run.py b/pythran/run.py index 720a1f65e..c435fcac5 100644 --- a/pythran/run.py +++ b/pythran/run.py @@ -10,7 +10,7 @@ import pythran from pythran.errors import PythranSyntaxError, PythranTypeError -from distutils.errors import CompileError +from setuptools.errors import CompileError logger = logging.getLogger("pythran") diff --git a/pythran/tests/test_openmp.py b/pythran/tests/test_openmp.py index 40e6409f2..9018c7ede 100644 --- a/pythran/tests/test_openmp.py +++ b/pythran/tests/test_openmp.py @@ -1,5 +1,5 @@ import unittest -from distutils.errors import CompileError +from setuptools.errors import CompileError from pythran.tests import TestFromDir import os import pythran diff --git a/pythran/toolchain.py b/pythran/toolchain.py index 7524fe3ac..cce90cd1b 100644 --- a/pythran/toolchain.py +++ b/pythran/toolchain.py @@ -21,12 +21,9 @@ from pythran.utils import cxxid import pythran.frontend as frontend -try: - from distutils.errors import CompileError - from distutils import sysconfig -except ImportError: - from setuptools.errors import CompileError - from setuptools._distutils import sysconfig +from setuptools.errors import CompileError +from setuptools._distutils import sysconfig + try: # `numpy.distutils is deprecated, may not be present, or broken from numpy.distutils.core import setup