1# Prefer setuptools, fall back to distutils
2try:
3    from setuptools import setup, Extension
4except ImportError:
5    from distutils.core import setup, Extension
6import os
7import sys
8
9extra_compile_args  = [ "-fno-strict-aliasing" ]
10
11XEN_ROOT = "../.."
12
13xenfsimage = Extension("xenfsimage",
14    extra_compile_args = extra_compile_args,
15    include_dirs = [ XEN_ROOT + "/tools/libfsimage/common/" ],
16    library_dirs = [ XEN_ROOT + "/tools/libfsimage/common/" ],
17    libraries = ["xenfsimage"],
18    sources = ["src/fsimage/fsimage.c"])
19
20pkgs = [ 'grub' ]
21
22setup(name='pygrub',
23      version='0.7',
24      description='Boot loader that looks a lot like grub for Xen',
25      author='Jeremy Katz',
26      author_email='katzj@redhat.com',
27      license='GPL',
28      package_dir={'grub': 'src', 'fsimage': 'src'},
29      packages=pkgs,
30      ext_modules = [ xenfsimage ]
31      )
32