aboutsummaryrefslogtreecommitdiffstats
path: root/tools/pygrub/setup.py
diff options
context:
space:
mode:
authorTim Deegan <Tim.Deegan@xensource.com>2006-11-09 14:11:11 +0000
committerTim Deegan <Tim.Deegan@xensource.com>2006-11-09 14:11:11 +0000
commit0d58f56d574711d54ed1764aedc3d7c212991c1b (patch)
tree98afd935f403545539deec23f52f26b924b6c5e8 /tools/pygrub/setup.py
parentcddc1d5a09b0ee520e31d9f56dfb4a20f6fb3ba1 (diff)
downloadxen-0d58f56d574711d54ed1764aedc3d7c212991c1b.tar.gz
xen-0d58f56d574711d54ed1764aedc3d7c212991c1b.tar.bz2
xen-0d58f56d574711d54ed1764aedc3d7c212991c1b.zip
Use libfsimage for reading filesystem images.
Signed-off-by: John Levon <john.levon@sun.com>
Diffstat (limited to 'tools/pygrub/setup.py')
-rw-r--r--tools/pygrub/setup.py41
1 files changed, 10 insertions, 31 deletions
diff --git a/tools/pygrub/setup.py b/tools/pygrub/setup.py
index 957c32c5b2..52dcf57373 100644
--- a/tools/pygrub/setup.py
+++ b/tools/pygrub/setup.py
@@ -5,46 +5,25 @@ import sys
extra_compile_args = [ "-fno-strict-aliasing", "-Werror" ]
-fsys_mods = []
-fsys_pkgs = []
+XEN_ROOT = "../.."
-if os.path.exists("/usr/include/ext2fs/ext2_fs.h"):
- ext2defines = []
- cc = new_compiler()
- cc.add_library("ext2fs")
- 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")
- sys.stderr.write(" disk support for ext2.\n")
-
- ext2 = Extension("grub.fsys.ext2._pyext2",
- extra_compile_args = extra_compile_args,
- libraries = ["ext2fs"],
- define_macros = ext2defines,
- sources = ["src/fsys/ext2/ext2module.c"])
- fsys_mods.append(ext2)
- fsys_pkgs.append("grub.fsys.ext2")
+fsimage = Extension("fsimage",
+ extra_compile_args = extra_compile_args,
+ include_dirs = [ XEN_ROOT + "/tools/libfsimage/common/" ],
+ library_dirs = [ XEN_ROOT + "/tools/libfsimage/common/" ],
+ libraries = ["fsimage"],
+ sources = ["src/fsimage/fsimage.c"])
-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")
+pkgs = [ 'grub' ]
-pkgs = ['grub', 'grub.fsys']
-pkgs.extend(fsys_pkgs)
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'},
+ package_dir={'grub': 'src', 'fsimage': 'src'},
scripts = ["src/pygrub"],
packages=pkgs,
- ext_modules = fsys_mods
+ ext_modules = [ fsimage ]
)
-