From 6b0be476407ecc83814028f1fcbed70e799055d6 Mon Sep 17 00:00:00 2001 From: Lisandro Dalcin Date: Wed, 14 Oct 2009 18:11:17 -0300 Subject: [PATCH] fix for distutils changes in upcoming Py2.7 and Py3.2 --- runtests.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/runtests.py b/runtests.py index 5d33f9a1..efb4d421 100644 --- a/runtests.py +++ b/runtests.py @@ -59,7 +59,11 @@ class build_ext(_build_ext): def build_extension(self, ext): if ext.language == 'c++': try: - self.compiler.compiler_so.remove('-Wstrict-prototypes') + try: # Py2.7+ & Py3.2+ + compiler_obj = self.compiler_obj + except AttributeError: + compiler_obj = self.compiler + compiler_obj.compiler_so.remove('-Wstrict-prototypes') except Exception: pass _build_ext.build_extension(self, ext) -- 2.26.2