from setuptools import setup, find_packages

from setuptools.extension import Extension
from setuptools.config import read_configuration

from Cython.Build import cythonize

import numpy

extensions = [
    Extension("ObservationSim.MockObject.SpecDisperser.disperse_c.interp", ["ObservationSim/MockObject/SpecDisperser/disperse_c/interp.pyx"],
        include_dirs = [numpy.get_include()],
        libraries=["m"]),
    
    Extension("ObservationSim.MockObject.SpecDisperser.disperse_c.disperse", ["ObservationSim/MockObject/SpecDisperser/disperse_c/disperse.pyx"],
        include_dirs = [numpy.get_include()],
        libraries=["m"]),
]


# setup(
#     name = "slssim_disperse",
#     ext_modules = cythonize(extensions),
# )



setup(name='CSSTSim', 
    version='0.3', 
    packages=find_packages(),
    install_requires=[
        'numpy>=1.18.5',
        'galsim>=2.2.4',
        'pyyaml>=5.3.1',
        'astropy>=4.0.1',
        'scipy>=1.5.0',
        'mpi4py>=3.0.3',
        'sep>=1.0.3',
        'healpy>=1.14.0',
        'h5py>=2.10.0',
        'Cython>=0.29.21'
        'numba>=0.50.1'
    ],
    package_data = {
        'ObservationSim.Astrometry.lib': ['libshao.so'], 
        'ObservationSim.MockObject.data': ['*.dat'], 
        'ObservationSim.Instrument.data': ['*.txt', '*.dat'], 
        'ObservationSim.Instrument.data.ccd': ['*.txt'], 
        'ObservationSim.Instrument.data.filters': ['*.txt', '*.list', '*.dat'], 
        'ObservationSim.Instrument.data.sls_conf': ['*.conf', '*.fits'],
        'Catalog.data': ['*.fits'],
    },
    ext_modules = cythonize(extensions),
)