#!/usr/bin/env python
# To use:
#       python setup.py install
#
import os, sys, string, re
from glob import glob
    
import distutils

#try:
import distutils
from distutils.command.install import install
from distutils.core import setup, Extension
# except:
#    raise SystemExit, "Distutils problem, see Numeric README."

headers = glob (os.path.join ("Include","*.h") )
header = headers + glob (os.path.join ("Include/Numeric","*.h") ) 

# The version is set in Lib/numeric_version.py
libraries_spf=[  "Hxx_Sparsa",
                                             "Hxx_nMatrix",
                                             "gsl",
                                             "gslcblas",
                                             "stdc++",
                                             "gcc",
                                             "lapackg77",
                                             "blasg77",
                                             "g2c",
                                             "m"]


libraries_sparsa=[  "Hxx_Sparsa",
                                             "Hxx_nMatrix",
                                             "stdc++",
                                             "gcc",
                                             "lapackg77",
                                             "blasg77",
                                             "g2c",
                                             "m"]

liblapackg77=[  "lapackg77", "blasg77", "g2c",]

librariesmkl=["mkl_lapack","mkl_ia32","guide" ] 



setup (name = "extension",
       description = " Extension to Python",
       ext_modules = [Extension('_Hilbertxxmodule',
                                ['Hilbertxx_wrap.cxx' ],
                                libraries=["Hilbertxx" ,  "Hxx_Sparsa",
                                           "Hxx_nMatrix", "gsl",
                                           "gslcblas",
                                           "stdc++",
                                           "gcc",]+
                                liblapackg77+["m"],
                                
                                include_dirs  = ['./'],
                                library_dirs  = ['.libs/',"mkl70/lib/32"]),
                      
	              Extension('_Sparsa',	
                                ['Sparsa_wrap.cxx' ],
                                libraries=libraries_sparsa,
                                include_dirs  = ['./'],
                                library_dirs  = ['.libs/',"mkl70/lib/32"]),
                      
                      
	              Extension('_spectrumFunction',	
                                ['spectrumFunction_wrap.cxx', 'spectrumFunction.cc' ],
                                libraries=libraries_spf,
                                include_dirs  = ['./'],
                                library_dirs  = ['.libs/',"mkl70/lib/32"]),
				

                     ]	
       )	
	







