# Python bindings for libxdrfile
# Copyright (c) 2010 Oliver Beckstein <orbeckst@gmail.com>
# Published under the GNU LESSER GENERAL PUBLIC LICENSE Version 3 (or higher)
"""Distutils setup for the stand-alone xdrfile package

Copy this file to the parent directory of xdrfile and rename it to
setup.py. See xdrfile/README for instructions.

"""

# For setuptools (easy install) uncomment
##from ez_setup import use_setuptools
##use_setuptools()
##from setuptools import setup, Extension

# For basic distutils use
from distutils.core import setup, Extension

import sys, os

# Obtain the numpy include directory.  This logic works across numpy versions.
import numpy
try:
    numpy_include = numpy.get_include()
except AttributeError:
    numpy_include = numpy.get_numpy_include()

include_dirs = [numpy_include]


if __name__ == '__main__':
    setup(name              = 'xdrfile',
          version           = '0.1-libxdrfile1.1',
          description       = 'Python interface to Gromacs XTC/TRR library libxdrfile',
          author            = 'David van der Spoel, Erik Lindahl, Oliver Beckstein',
          author_email      = 'orbeckst@gmail.com',
          url               = 'http://mdanalysis.googlecode.com/',
          license           = 'GPL 2',
          packages          = ['xdrfile'],
          package_dir       = {'xdrfile': 'xdrfile'},
          ext_package       = 'xdrfile',
          ext_modules       = [Extension('_libxdrfile',
                                         sources=['xdrfile/libxdrfile_wrap.c',
                                                  'xdrfile/xdrfile.c', 	
                                                  'xdrfile/xdrfile_trr.c',
                                                  'xdrfile/xdrfile_xtc.c'],
                                         include_dirs = include_dirs),],
          )
