-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsetup.py
49 lines (43 loc) · 1.91 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
# Copyright 2010-2018 M. S. Andersen & L. Vandenberghe
#
# This file is part of SMCP.
#
# SMCP is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# SMCP is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with SMCP. If not, see <http://www.gnu.org/licenses/>.
from setuptools import setup, Extension
import os, sys
import versioneer
if sys.version < '2.7':
sys.exit('ERROR: Sorry, python 2.7 is required for this extension.')
LIBRARIES = os.environ.get("SMCP_LIBRARIES",[])
if type(LIBRARIES) is str: LIBRARIES = LIBRARIES.strip().split(';')
EXTRA_COMPILE_ARGS = os.environ.get("SMCP_EXTRA_COMPILE_ARGS",[])
if type(EXTRA_COMPILE_ARGS) is str: EXTRA_COMPILE_ARGS = EXTRA_COMPILE_ARGS.strip().split(';')
misc = Extension('misc',
# include_dirs = [ CVXOPT_SRC ],
libraries = LIBRARIES,
extra_compile_args = EXTRA_COMPILE_ARGS,
sources = ['src/C/misc.c'])
setup(name="smcp",
version=versioneer.get_version(),
cmdclass=versioneer.get_cmdclass(),
description="Python extension for solving sparse matrix cone programs",
author="Martin S. Andersen and Lieven Vandenberghe",
author_email="[email protected], [email protected]",
url="http://cvxopt.github.io/smcp",
license = 'GNU GPL version 3',
packages = ['smcp',],
package_dir = {'smcp':'src/python'},
ext_package = "smcp",
ext_modules = [misc],
install_requires = ["cvxopt (>=1.1.9)","chompack (>=2.3.2)"])