From 7d4d8fe1db257b9771d348d4ef4ade6db5cf2868 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Mon, 28 Sep 2020 13:06:07 -0500 Subject: [PATCH] aksetup: Tolerate setuptools missing on import --- aksetup_helper.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/aksetup_helper.py b/aksetup_helper.py index 1752dd0a..8fd58f2b 100644 --- a/aksetup_helper.py +++ b/aksetup_helper.py @@ -1,8 +1,15 @@ -import setuptools # noqa -from setuptools import Extension import sys -from setuptools.command.build_ext import ( # noqa: N812 - build_ext as BaseBuildExtCommand) +try: + from setuptools import Extension + from setuptools.command.build_ext import ( # noqa: N812 + build_ext as BaseBuildExtCommand) + +except ImportError: + class Extension: + pass + + class BaseBuildExtCommand: + pass def count_down_delay(delay): -- GitLab