Skip to content

Commit 5c09545

Browse files
authored
Replace distutils.dep_util with setuptools.modified (#2148)
1 parent 452c094 commit 5c09545

2 files changed

Lines changed: 9 additions & 6 deletions

File tree

com/win32com/test/pippo_server.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,10 @@ def Method3(self, in1):
4141

4242

4343
def BuildTypelib():
44-
# https://github.com/pypa/setuptools/pull/4069
45-
from distutils.dep_util import newer
44+
if sys.version_info >= (3, 8):
45+
from setuptools.modified import newer
46+
else:
47+
from distutils.dep_util import newer
4648

4749
this_dir = os.path.dirname(__file__)
4850
idl = os.path.abspath(os.path.join(this_dir, "pippo.idl"))

setup.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,12 @@
4444
from setuptools.command.install import install
4545
from setuptools.command.install_lib import install_lib
4646

47-
# https://github.com/pypa/setuptools/pull/4069
48-
from distutils.dep_util import newer_group
4947
from distutils.command.install_data import install_data
50-
from distutils.command.install_lib import install_lib
51-
from distutils.core import Extension
48+
49+
if sys.version_info >= (3, 8):
50+
from setuptools.modified import newer_group
51+
else:
52+
from distutils.dep_util import newer_group
5253

5354
# some modules need a static CRT to avoid problems caused by them having a
5455
# manifest.

0 commit comments

Comments
 (0)