[Python-checkins] cpython (2.7): Issue #16537: Check whether self.extensions is empty in setup.py.

berker.peksag python-checkins at python.org
Sat Sep 27 21:54:58 CEST 2014


https://hg.python.org/cpython/rev/6946036f21ef
changeset:   92607:6946036f21ef
branch:      2.7
parent:      92595:2ae2ca9d2b66
user:        Berker Peksag <berker.peksag at gmail.com>
date:        Sat Sep 27 22:55:10 2014 +0300
summary:
  Issue #16537: Check whether self.extensions is empty in setup.py.

Patch by Jonathan Hosmer.

files:
  Misc/ACKS |  1 +
  Misc/NEWS |  3 +++
  setup.py  |  4 +++-
  3 files changed, 7 insertions(+), 1 deletions(-)


diff --git a/Misc/ACKS b/Misc/ACKS
--- 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
--- 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
--- 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]))
 

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list