Issue #16537: Check whether self.extensions is empty in setup.py.
Patch by Jonathan Hosmer.
diff --git a/Misc/ACKS b/Misc/ACKS
index ccfc18e..c86acd9 100644
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -582,6 +582,7 @@
Nadav Horesh
Alon Horev
Jan Hosang
+Jonathan Hosmer
Alan Hourihane
Ken Howard
Brad Howes
diff --git a/Misc/NEWS b/Misc/NEWS
index 2ad73fd..b50f45d 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -205,6 +205,9 @@
Build
-----
+- Issue #16537: Check whether self.extensions is empty in setup.py. Patch by
+ Jonathan Hosmer.
+
- The documentation Makefile no longer automatically downloads Sphinx. Users are
now required to have Sphinx already installed to build the documentation.
diff --git a/setup.py b/setup.py
index a46bf35..7868b7b 100644
--- a/setup.py
+++ b/setup.py
@@ -250,7 +250,9 @@
build_ext.build_extensions(self)
- longest = max([len(e.name) for e in self.extensions])
+ longest = 0
+ if self.extensions:
+ longest = max([len(e.name) for e in self.extensions])
if self.failed:
longest = max(longest, max([len(name) for name in self.failed]))