From 8d4fdaad4b78c6bbb146220b5db3d753fc59c3b5 Mon Sep 17 00:00:00 2001 From: Chuck Blake Date: Thu, 22 Jul 2010 22:11:45 -0400 Subject: [PATCH] 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. --- Cython/Distutils/build_ext.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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. -- 2.26.2