direct-io.hg

view tools/pygrub/setup.py @ 7477:5a7baecb1c70

Fix an issue for passing arguement from control panel to deivce model
for some arguemnt like 'localtime', 'isa', device model need an argument
"-localtime", instead of "-localtime 1"
Signed-off-by: Xiaofeng Ling <xiaofeng.ling@intel.com>
author kaf24@firebug.cl.cam.ac.uk
date Sun Oct 23 16:51:47 2005 +0100 (2005-10-23)
parents 3951b5b01cfd
children 06d08564b982
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 setup(name='pygrub',
38 version='0.3',
39 description='Boot loader that looks a lot like grub for Xen',
40 author='Jeremy Katz',
41 author_email='katzj@redhat.com',
42 license='GPL',
43 package_dir={'grub': 'src'},
44 scripts = ["src/pygrub"],
45 packages=['grub',
46 'grub.fsys'].extend(fsys_pkgs),
47 ext_modules = fsys_mods
48 )