from distutils.core import setup, Extension

import os
import sys
import numpy
import platform



proc_name = platform.processor() 

#For new Macs with arm64
if proc_name in ['arm64','x86_64']:
    gsl_include_dir = ['/opt/homebrew/Cellar/gsl/2.7.1/include/']
    gsl_lib_dir = ['/opt/homebrew/cellar/gsl/2.7.1/lib/']
else:
    gsl_include_dir = ['/usr/local/include/']
    gsl_lib_dir = ['/usr/local/lib/']



#macosx_python_include_dir = ['/Users/bourrier/opt/anaconda3/lib/python3.8/site-packages/numpy/core/include/numpy/']
macosx_python_include_dir = ['/Users/bourrier/opt/anaconda3/envs/spyder-env/lib/python3.11/site-packages/numpy/core/include/numpy/']

module1 = Extension('calculate_RV_line_by_line3',
        include_dirs = macosx_python_include_dir + gsl_include_dir,
        library_dirs = gsl_lib_dir,
        libraries = ['gsl','gslcblas'],
        sources = ['calculate_RV_line_by_line_Bouchy.c'])

setup (name = 'Calculate the RV of a line using the Bouchy method with a spectral line master',
        version = '1.0',
        description = '',
        ext_modules = [module1])

