ia64/xen-unstable
changeset 7445:f7552b93adeb
pygrub's setup.py relies on distutils.UnixCCompiler.has_function(),
which does not exist with python2.2, causing the following build
error:
make[2]: Entering directory `/home/muli/xen/x86.hg/tools/pygrub'
CFLAGS=" -m32 -march=i686" python setup.py build
Traceback (most recent call last):
File "setup.py", line 15, in ?
if cc.has_function("ext2fs_open2"):
AttributeError: UnixCCompiler instance has no attribute 'has_function'
The following patch gets it to build, but is pretty ugly. A proper fix
would be to do the check for ext2fs_open2() in a way that is backward
compatible with python2.2.
Signed-Off-By: Muli Ben-Yehuda <mulix@mulix.org>
which does not exist with python2.2, causing the following build
error:
make[2]: Entering directory `/home/muli/xen/x86.hg/tools/pygrub'
CFLAGS=" -m32 -march=i686" python setup.py build
Traceback (most recent call last):
File "setup.py", line 15, in ?
if cc.has_function("ext2fs_open2"):
AttributeError: UnixCCompiler instance has no attribute 'has_function'
The following patch gets it to build, but is pretty ugly. A proper fix
would be to do the check for ext2fs_open2() in a way that is backward
compatible with python2.2.
Signed-Off-By: Muli Ben-Yehuda <mulix@mulix.org>
author | kaf24@firebug.cl.cam.ac.uk |
---|---|
date | Wed Oct 19 16:07:11 2005 +0100 (2005-10-19) |
parents | b3e6901f4cdb |
children | 471e8ca6bc1f |
files | tools/pygrub/setup.py |
line diff
1.1 --- a/tools/pygrub/setup.py Wed Oct 19 15:51:14 2005 +0100 1.2 +++ b/tools/pygrub/setup.py Wed Oct 19 16:07:11 2005 +0100 1.3 @@ -12,11 +12,14 @@ if os.path.exists("/usr/include/ext2fs/e 1.4 ext2defines = [] 1.5 cc = new_compiler() 1.6 cc.add_library("ext2fs") 1.7 - if cc.has_function("ext2fs_open2"): 1.8 - ext2defines.append( ("HAVE_EXT2FS_OPEN2", None) ) 1.9 - else: 1.10 - sys.stderr.write("WARNING: older version of e2fsprogs installed, not building full\n") 1.11 - sys.stderr.write(" disk support for ext2.\n") 1.12 + try: 1.13 + if cc.has_function("ext2fs_open2"): 1.14 + ext2defines.append( ("HAVE_EXT2FS_OPEN2", None) ) 1.15 + else: 1.16 + sys.stderr.write("WARNING: older version of e2fsprogs installed, not building full\n") 1.17 + sys.stderr.write(" disk support for ext2.\n") 1.18 + except AttributeError: 1.19 + pass 1.20 1.21 ext2 = Extension("grub.fsys.ext2._pyext2", 1.22 extra_compile_args = extra_compile_args,