ia64/xen-unstable

view tools/pygrub/setup.py @ 8740:3d7ea7972b39

Update patches for linux 2.6.15.

Signed-off-by: Christian Limpach <Christian.Limpach@cl.cam.ac.uk>
author cl349@firebug.cl.cam.ac.uk
date Thu Feb 02 17:16:00 2006 +0000 (2006-02-02)
parents 06d08564b982
children 4c2d9a2ef1b7
line source
1 from distutils.core import setup, Extension
2 from distutils.ccompiler import new_compiler
3 import os
4 import sys
6 extra_compile_args = [ "-fno-strict-aliasing", "-Wall", "-Werror" ]
8 fsys_mods = []
9 fsys_pkgs = []
11 if os.path.exists("/usr/include/ext2fs/ext2_fs.h"):
12 ext2defines = []
13 cc = new_compiler()
14 cc.add_library("ext2fs")
15 if hasattr(cc, "has_function") and cc.has_function("ext2fs_open2"):
16 ext2defines.append( ("HAVE_EXT2FS_OPEN2", None) )
17 else:
18 sys.stderr.write("WARNING: older version of e2fsprogs installed, not building full\n")
19 sys.stderr.write(" disk support for ext2.\n")
21 ext2 = Extension("grub.fsys.ext2._pyext2",
22 extra_compile_args = extra_compile_args,
23 libraries = ["ext2fs"],
24 define_macros = ext2defines,
25 sources = ["src/fsys/ext2/ext2module.c"])
26 fsys_mods.append(ext2)
27 fsys_pkgs.append("grub.fsys.ext2")
29 if os.path.exists("/usr/include/reiserfs/reiserfs.h"):
30 reiser = Extension("grub.fsys.reiser._pyreiser",
31 extra_compile_args = extra_compile_args,
32 libraries = ["reiserfs"],
33 sources = ["src/fsys/reiser/reisermodule.c"])
34 fsys_mods.append(reiser)
35 fsys_pkgs.append("grub.fsys.reiser")
37 pkgs = ['grub', 'grub.fsys']
38 pkgs.extend(fsys_pkgs)
39 setup(name='pygrub',
40 version='0.3',
41 description='Boot loader that looks a lot like grub for Xen',
42 author='Jeremy Katz',
43 author_email='katzj@redhat.com',
44 license='GPL',
45 package_dir={'grub': 'src'},
46 scripts = ["src/pygrub"],
47 packages=pkgs,
48 ext_modules = fsys_mods
49 )