-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathsetup.py
56 lines (48 loc) · 1.66 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
import os
from setuptools import setup, find_packages, Extension
try:
import numpy as np
from Cython.Build import cythonize
import pkgconfig
except ImportError:
raise ImportError('Build process requires numpy, cython and pkconfig.')
if not pkgconfig.exists('osi-clp'):
raise ImportError('Building extension requires osi-clp discoverable by pkg-config')
requirements = pkgconfig.parse('osi-clp')
requirements['include_dirs'].append(np.get_include())
package_requires = [
'numpy',
'scipy',
]
extras_require = {
'tests': ['pytest', 'mock'],
'scripts': ['click', 'pandas', 'tqdm'],
'analysis': ['matplotlib', 'seaborn'],
}
extensions = cythonize(Extension(
'lp_generators_ext', language='c++',
sources=['cpp/lp_generators_ext.pyx', 'cpp/lp.cpp'],
extra_compile_args=['-std=c++11'],
**requirements))
setup(
name='lp_generators',
version='0.1.0',
description='Generation of MIP test cases by LP relaxation.',
url='https://github.com/simonbowly/lp-generators',
author='Simon Bowly',
author_email='[email protected]',
license='MIT',
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Science/Research',
'Intended Audience :: Education',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 3',
'Programming Language :: Cython',
'Programming Language :: C++',
'Topic :: Scientific/Engineering :: Mathematics'],
packages=['lp_generators'],
package_dir={'lp_generators': 'lp_generators'},
install_requires=package_requires,
extras_require=extras_require,
ext_modules=extensions)