Files
xen/tools/pygrub/setup.py
T
smh22@firebug.cl.cam.ac.uk a89e4d770c The attached patch adds the support that was only stubbed in to be able
to support having reading the boot loader config when you're using a
whole disk (eg, file:/root/disk.img,xvda,w) as opposed to just a
partition.

This reads the partition table in the MBR to find the active partition
and then passes that offset down into the filesystem reading code.

Signed-off-by: Jeremy Katz <katzj@redhat.com>
2005-08-02 09:31:47 +00:00

38 lines
1.2 KiB
Python

from distutils.core import setup, Extension
import os
extra_compile_args = [ "-fno-strict-aliasing", "-Wall", "-Werror" ]
fsys_mods = []
fsys_pkgs = []
if os.path.exists("/usr/include/ext2fs/ext2_fs.h"):
ext2 = Extension("grub.fsys.ext2._pyext2",
extra_compile_args = extra_compile_args,
libraries = ["ext2fs"],
sources = ["src/fsys/ext2/ext2module.c"])
fsys_mods.append(ext2)
fsys_pkgs.append("grub.fsys.ext2")
if os.path.exists("/usr/include/reiserfs/reiserfs.h"):
reiser = Extension("grub.fsys.reiser._pyreiser",
extra_compile_args = extra_compile_args,
libraries = ["reiserfs"],
sources = ["src/fsys/reiser/reisermodule.c"])
fsys_mods.append(reiser)
fsys_pkgs.append("grub.fsys.reiser")
setup(name='pygrub',
version='0.3',
description='Boot loader that looks a lot like grub for Xen',
author='Jeremy Katz',
author_email='katzj@redhat.com',
license='GPL',
package_dir={'grub': 'src'},
scripts = ["src/pygrub"],
packages=['grub',
'grub.fsys'].extend(fsys_pkgs),
ext_modules = fsys_mods
)