forked from alpha-miner/alpha-mind
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
65 lines (58 loc) · 2.05 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# -*- coding: utf-8 -*-
"""
Created on 2017-4-25
@author: cheng.li
"""
import platform
import io
from setuptools import setup
from setuptools import find_packages
from Cython.Build import cythonize
from distutils.extension import Extension
import numpy as np
VERSION = "0.1.0"
if platform.system() != "Windows":
import multiprocessing
n_cpu = multiprocessing.cpu_count()
else:
n_cpu = 0
if platform.system() != "Windows":
extensions = [
Extension('alphamind.cython.optimizers',
['alphamind/cython/optimizers.pyx'],
include_dirs=["./libs/include/clp",
"./libs/include/ipopt",
"./libs/include/pfopt",
"./libs/include/eigen",
"./libs/include/alglib"],
libraries=['pfopt'],
library_dirs=['./libs/lib/linux'],
extra_compile_args=['-std=c++11']),
]
else:
extensions = [
Extension('alphamind.cython.optimizers',
['alphamind/cython/optimizers.pyx'],
include_dirs=["./libs/include/clp",
"./libs/include/ipopt",
"./libs/include/pfopt",
"./libs/include/eigen",
"./libs/include/alglib"],
libraries=['pfopt', 'alglib', 'libClp', 'libCoinUtils', 'libipopt', 'libcoinhsl', 'libcoinblas', 'libcoinlapack', 'libcoinmetis'],
library_dirs=['./libs/lib/windows'],
extra_compile_args=['/MT']),
]
setup(
name='Alpha-Mind',
version=VERSION,
packages=find_packages(),
url='',
license='MIT',
author='wegamekinglc',
author_email='',
scripts=['alphamind/bin/alphamind'],
install_requires=io.open('requirements.txt', encoding='utf8').read(),
include_dirs=[np.get_include()],
ext_modules=cythonize(extensions),
description=''
)