import os
import sys
import pybind11
import platform
from setuptools import setup, Extension

cpp_args = []
cpp_libs = []

if platform.system() == 'Windows':
    cpp_args = ['/std:c++latest', '/MD', '/O2', '/Ob2', '/DNDEBUG', '/MT', '/openmp']
else:
    cpp_args = ['-std=c++17', '-O3', '-march=native', '-fopenmp']
    cpp_libs = ['gomp']

ext_modules = [
    Extension(
        'reap',
        ['./src/pybind11/Reap.cpp'],
        include_dirs=['./include', pybind11.get_include(True), 'external/disc-pattern-miner/include'],
        language='c++',
        libraries=cpp_libs,
        extra_compile_args=cpp_args,
    )
]

setup(
    name='reap',
    version='0.3.0',
    author='<triple-blind>',
    author_email='<triple-blind>',
    license="MIT",
    description='',
    ext_modules=ext_modules,
    install_requires=['pybind11', 'numpy'],
)
