mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 18:21:39 +01:00
- 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>
38 lines
1.2 KiB
Python
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.2',
|
|
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
|
|
)
|
|
|