Skip to content

Commit 4ddd4ca

Browse files
committed
Do not use distutils
1 parent d781052 commit 4ddd4ca

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

HISTORY.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
History
44
-------
55

6+
2.3.0
7+
++++++++++++++++++
8+
9+
* ``distutils`` is no longer used for building the C extension.
10+
611
2.2.0 (2021-09-24)
712
++++++++++++++++++
813

setup.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,18 @@
55
# This import is apparently needed for Nose on Red Hat's Python
66
import multiprocessing
77

8-
from distutils.command.build_ext import build_ext
9-
from distutils.errors import CCompilerError, DistutilsExecError, DistutilsPlatformError
10-
118
from setuptools import setup, Extension
9+
from setuptools.command.build_ext import build_ext
10+
11+
# These were only added to setuptools in 59.0.1.
12+
try:
13+
from setuptools.errors import CCompilerError
14+
from setuptools.errors import DistutilsExecError
15+
from setuptools.errors import DistutilsPlatformError
16+
except ImportError:
17+
from distutils.errors import CCompilerError
18+
from distutils.errors import DistutilsExecError
19+
from distutils.errors import DistutilsPlatformError
1220

1321
cmdclass = {}
1422
PYPY = hasattr(sys, "pypy_version_info")

0 commit comments

Comments
 (0)