forked from embotech/ecos-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
60 lines (56 loc) · 2.27 KB
/
setup.py
File metadata and controls
60 lines (56 loc) · 2.27 KB
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
from __future__ import print_function
try:
from setuptools import setup, Extension
except ImportError:
print("Please use pip (https://pypi.python.org/pypi/pip) to install.")
raise
from glob import glob
from platform import system
import numpy
lib = []
if system() == 'Linux':
lib += ['rt']
_ecos = Extension('_ecos', libraries = lib,
# define LDL and AMD to use long ints
# also define that we are building a python module
define_macros = [
('PYTHON',None),
('DLONG', None),
('LDL_LONG', None),
('CTRLC', 1)],
include_dirs = ['ecos/include', numpy.get_include(),
'ecos/external/amd/include',
'ecos/external/ldl/include',
'ecos/external/SuiteSparse_config'],
sources = ['src/ecosmodule.c',
'ecos/external/ldl/src/ldl.c',
'ecos/src/cone.c',
'ecos/src/ctrlc.c',
'ecos/src/ecos.c',
'ecos/src/equil.c',
'ecos/src/expcone.c',
'ecos/src/kkt.c',
'ecos/src/preproc.c',
'ecos/src/spla.c',
'ecos/src/splamm.c',
'ecos/src/timer.c',
'ecos/src/wright_omega.c'
] + glob('ecos/external/amd/src/*.c')
+ glob('ecos/ecos_bb/*.c')) # glob bb source files
setup(
name = 'ecos',
version = '2.0.4', # read from ecos submodule
# point to README.md file instead of plain-text readme
author = 'Alexander Domahidi, Eric Chu, Han Wang, Santiago Akle',
author_email = 'domahidi@embotech.com, echu@cs.stanford.edu, hanwang2@stanford.edu, tiagoakle@gmail.com',
url = 'http://github.com/embotech/ecos',
description = 'This is the Python package for ECOS: Embedded Cone Solver. See Github page for more information.',
license = "GPLv3",
package_dir = {'': 'src'},
py_modules = ['ecos'],
ext_modules = [_ecos],
install_requires = [
"numpy >= 1.6",
"scipy >= 0.9"
]
)