From: Jeremy Katz Subject: Re: pygrug breaks build with python2.2 Date: Thu, 20 Oct 2005 11:48:22 -0400 Message-ID: <1129823302.2050.6.camel@bree.local.net> References: <20051019150349.GP26239@granada.merseine.nu> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-AeED3d0uqJwyfANtFEtm" Return-path: In-Reply-To: <20051019150349.GP26239@granada.merseine.nu> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Muli Ben-Yehuda Cc: xen-devel List-Id: xen-devel@lists.xenproject.org --=-AeED3d0uqJwyfANtFEtm Content-Type: text/plain Content-Transfer-Encoding: 7bit On Wed, 2005-10-19 at 17:03 +0200, Muli Ben-Yehuda wrote: > pygrub's setup.py relies on distutils.UnixCCompiler.has_function(), > which does not exist with python2.2, causing the following build > error: *sigh* And there doesn't seem to be a good way to do the functionality with older distutils. I guess if you're running that old of a python, it's probably fair to think that the version of e2fsprogs is old as well. Something like the following is a little bit cleaner, though. Signed-off-by: Jeremy Katz Jeremy --=-AeED3d0uqJwyfANtFEtm Content-Disposition: attachment; filename=xen-pygrub-old-distutils-lacks-functionality.patch Content-Type: text/x-patch; name=xen-pygrub-old-distutils-lacks-functionality.patch; charset=UTF-8 Content-Transfer-Encoding: 7bit diff -r 7c951e3eb5ab tools/pygrub/setup.py --- a/tools/pygrub/setup.py Wed Oct 19 10:53:00 2005 +++ b/tools/pygrub/setup.py Thu Oct 20 11:48:00 2005 @@ -12,7 +12,7 @@ ext2defines = [] cc = new_compiler() cc.add_library("ext2fs") - if cc.has_function("ext2fs_open2"): + if hasattr(cc, "has_function") and cc.has_function("ext2fs_open2"): ext2defines.append( ("HAVE_EXT2FS_OPEN2", None) ) else: sys.stderr.write("WARNING: older version of e2fsprogs installed, not building full\n") --=-AeED3d0uqJwyfANtFEtm Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --=-AeED3d0uqJwyfANtFEtm--