From 3f2746ad05067aad960f7a08e53f6e72c5eecd07 Mon Sep 17 00:00:00 2001 From: Bartosz Bilas Date: Sat, 12 Jun 2021 13:50:15 +0200 Subject: [PATCH] setup.py: require wheel only when installing from pip Fix the build from sources (that don't require wheel) in environments where this module is not available. Signed-off-by: Bartosz Bilas Signed-off-by: Bartosz Bilas --- Upstream status: https://github.com/espressif/esptool/pull/632 setup.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 2b17b28..1a8421d 100644 --- a/setup.py +++ b/setup.py @@ -110,7 +110,11 @@ setup( 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', ], - setup_requires=['wheel'] if sys.version_info[0:2] not in [(3, 4), (3, 5)] else [], + setup_requires=( + ['wheel'] + if 'bdist_wheel' in sys.argv and sys.version_info[0:2] not in [(3, 4), (3, 5)] else + [] + ), extras_require={ "dev": [ 'flake8>=3.2.0', -- 2.32.0