Skip to content

Commit 7672dd7

Browse files
committed
Python bindings: fix build error on Windows with setuptools 80.0
1 parent f31e3b9 commit 7672dd7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

swig/python/setup.py.in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import sys
1212
from glob import glob
1313
from pathlib import Path
1414

15+
import setuptools
1516
from setuptools.command.build_ext import build_ext
1617
from setuptools import setup
1718
from setuptools import find_packages
@@ -157,7 +158,7 @@ def has_flag(compiler, flagname):
157158
# since they may be directly used by users. So we do a monkey patching of
158159
# easy_install.install_wrapper_scripts to install a modified
159160
# easy_install.delete_blockers method that does NOT remove .py files
160-
if sys.platform == 'win32':
161+
if sys.platform == 'win32' and int(setuptools.__version__.split('.')[0]) < 80:
161162
from setuptools.command.easy_install import easy_install
162163

163164
original_install_wrapper_scripts = easy_install.install_wrapper_scripts

0 commit comments

Comments
 (0)