===== tools/pygrub/setup.py 1.2 vs edited ===== --- 1.2/tools/pygrub/setup.py 2005-04-28 08:27:46 -04:00 +++ edited/tools/pygrub/setup.py 2005-05-23 19:49:51 -04:00 @@ -3,14 +3,19 @@ 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") 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@xxxxxxxxxx', @@ -18,8 +23,7 @@ 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 )