diff options
author | kaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk> | 2005-05-25 22:22:44 +0000 |
---|---|---|
committer | kaf24@firebug.cl.cam.ac.uk <kaf24@firebug.cl.cam.ac.uk> | 2005-05-25 22:22:44 +0000 |
commit | 29a355e904a3521db6a4de01731ed8c5fd0cbf3d (patch) | |
tree | 69fd69d468ce45effa0eb78ea7b3ad1d3265f8c9 /tools/pygrub/setup.py | |
parent | 1e3c2c1671cdf008cd7dab03c502e655b51953d8 (diff) | |
download | xen-29a355e904a3521db6a4de01731ed8c5fd0cbf3d.tar.gz xen-29a355e904a3521db6a4de01731ed8c5fd0cbf3d.tar.bz2 xen-29a355e904a3521db6a4de01731ed8c5fd0cbf3d.zip |
bitkeeper revision 1.1559 (4294fab4CMjRyJfuEBP1lUbAC6G9GA)
- pygrub/README provides information on packages needed to compile pygrub
- support reiserfs {2,3} filesystem
- dynamically build modules based on which filesystem libraries the
system has (proposed by Jeremy)
- pump up pygrub to version 0.2
Signed-off-by: Jeremy Katz <katzj@redhat.com>
Signed-off-by: Nguyen Anh Quynh <aquynh@gmail.com>
Diffstat (limited to 'tools/pygrub/setup.py')
-rw-r--r-- | tools/pygrub/setup.py | 30 |
1 files changed, 21 insertions, 9 deletions
diff --git a/tools/pygrub/setup.py b/tools/pygrub/setup.py index 193c160a3b..b72ea38857 100644 --- a/tools/pygrub/setup.py +++ b/tools/pygrub/setup.py @@ -3,14 +3,27 @@ import os extra_compile_args = [ "-fno-strict-aliasing", "-Wall", "-Werror" ] -# in a perfect world, we'd figure out the fsys modules dynamically -ext2 = Extension("grub.fsys.ext2._pyext2", - extra_compile_args = extra_compile_args, - libraries = ["ext2fs"], - sources = ["src/fsys/ext2/ext2module.c"]) +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.1', + version='0.2', description='Boot loader that looks a lot like grub for Xen', author='Jeremy Katz', author_email='katzj@redhat.com', @@ -18,8 +31,7 @@ setup(name='pygrub', package_dir={'grub': 'src'}, scripts = ["src/pygrub"], packages=['grub', - 'grub.fsys', - 'grub.fsys.ext2'], - ext_modules = [ext2] + 'grub.fsys'].extend(fsys_pkgs), + ext_modules = fsys_mods ) |