From: Berker Peksag Date: Sat, 27 Sep 2014 19:55:10 +0000 (+0300) Subject: Issue #16537: Check whether self.extensions is empty in setup.py. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1b4b7af1d1353ac2eaaa65bee69a750b5d249e95;p=python Issue #16537: Check whether self.extensions is empty in setup.py. Patch by Jonathan Hosmer. --- diff --git a/Misc/ACKS b/Misc/ACKS index ccfc18ed0e..c86acd9492 100644 --- a/Misc/ACKS +++ b/Misc/ACKS @@ -582,6 +582,7 @@ Randall Hopper Nadav Horesh Alon Horev Jan Hosang +Jonathan Hosmer Alan Hourihane Ken Howard Brad Howes diff --git a/Misc/NEWS b/Misc/NEWS index 2ad73fdf81..b50f45d214 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -205,6 +205,9 @@ Tests 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 a46bf35eb4..7868b7b241 100644 --- a/setup.py +++ b/setup.py @@ -250,7 +250,9 @@ class PyBuildExt(build_ext): 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]))