forked from dwf/glmnet-python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
42 lines (35 loc) · 1.18 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
import os
import sys
from numpy.distutils.misc_util import Configuration
# Get version
with open('glmnet/version.py') as f:
for line in f:
if line.find('__version__') >= 0:
version = line.split("=")[1].strip()
version = version.strip('"')
version = version.strip("'")
continue
config = Configuration(
'glmnet',
parent_package=None,
top_path=None
)
f_sources = ['glmnet/glmnet.pyf', 'glmnet/glmnet.f']
fflags = ['-fdefault-real-8', '-ffixed-form']
config.add_extension(name='_glmnet',
sources=f_sources,
extra_f77_compile_args=fflags,
extra_f90_compile_args=fflags)
config_dict = config.todict()
if __name__ == '__main__':
from numpy.distutils.core import setup
setup(version=version,
description='Python wrappers for the GLMNET package',
author='David Warde-Farley',
author_email='[email protected]',
url='github.com/dwf/glmnet-python',
license='GPL2',
install_requires=['numpy>=1.3',
'scikit-learn>=0.14.0'],
packages=['glmnet'],
**config_dict)