From c56a7e4559788b16153e87c927b086ba78f89ef0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20R=C3=BCth?= Date: Thu, 19 Nov 2020 12:48:26 +0100 Subject: [PATCH] Use _build_ext from cmds --- src/cmdclass.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/cmdclass.py b/src/cmdclass.py index 9aa0be41..ba1fa81a 100644 --- a/src/cmdclass.py +++ b/src/cmdclass.py @@ -92,7 +92,9 @@ def run(self): write_to_version_file(target_versionfile, versions) cmds["build_py"] = cmd_build_py - if "setuptools" in sys.modules: + if 'build_ext' in cmds: + _build_ext = cmds['build_ext'] + elif "setuptools" in sys.modules: from setuptools.command.build_ext import build_ext as _build_ext else: from distutils.command.build_ext import build_ext as _build_ext