From: Chuck Blake Date: Fri, 23 Jul 2010 02:11:45 +0000 (-0400) Subject: Easy enough to wrap in a hasattr. On my system only py31 complains, but on X-Git-Tag: 0.13.beta0~3 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=8d4fdaad4b78c6bbb146220b5db3d753fc59c3b5;hp=083cceb6b12721daf789bd6d33216a2d3a39e9ad;p=cython.git Easy enough to wrap in a hasattr. On my system only py31 complains, but on the Hudson autobuild, most versions complain about a missing attribute. --- diff --git a/Cython/Distutils/build_ext.py b/Cython/Distutils/build_ext.py index 0f8acf5a..652c5a7f 100644 --- a/Cython/Distutils/build_ext.py +++ b/Cython/Distutils/build_ext.py @@ -149,7 +149,8 @@ class build_ext(_build_ext.build_ext): # 2. Add in any (unique) entries from the extension # pyrex_directives (if Cython.Distutils.extension is used). directives = self.pyrex_directives - directives.update(extension.pyrex_directives) + if hasattr(extension, "pyrex_directives"): + directives.update(extension.pyrex_directives) # Set the target_ext to '.c'. Cython will change this to '.cpp' if # needed.