35 lines
1.2 KiB
Diff
35 lines
1.2 KiB
Diff
From 47e3701f79feee387c34eed3f3d5f7d1aa880835 Mon Sep 17 00:00:00 2001
|
|
From: Christoph Reiter <reiter.christoph@gmail.com>
|
|
Date: Thu, 18 Jul 2024 09:00:27 +0200
|
|
Subject: [PATCH] Fix build with setuptools v70.0.0
|
|
|
|
Setuptools v70.0.0 removed the setuptools.dep_util module and added
|
|
a replacement called setuptools.modified. The replacement exists since
|
|
v69.0.0.
|
|
|
|
To avoid dropping support for older setuptools (in case people have pinned
|
|
it due to this issue) try the old name too if needed.
|
|
|
|
Fixes #208
|
|
---
|
|
py2exe_setuptools.py | 6 +++++-
|
|
1 file changed, 5 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/py2exe_setuptools.py b/py2exe_setuptools.py
|
|
index 2618402..6582d80 100644
|
|
--- a/py2exe_setuptools.py
|
|
+++ b/py2exe_setuptools.py
|
|
@@ -7,7 +7,11 @@
|
|
from setuptools.command.build_ext import build_ext
|
|
from setuptools.dist import Distribution
|
|
from setuptools.extension import Extension
|
|
-from setuptools.dep_util import newer_group
|
|
+try:
|
|
+ # available since setuptools v69.0.0
|
|
+ from setuptools.modified import newer_group
|
|
+except ImportError:
|
|
+ from setuptools.dep_util import newer_group
|
|
from setuptools.errors import CCompilerError, CompileError, PlatformError, SetupError
|
|
|
|
from sysconfig import get_platform
|