-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
90 lines (68 loc) · 2.06 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# import the required functionality.
from setuptools import setup, Extension
import unittest
import os, sys
# initialize the include directories list.
inc = ['.']
# walk the 'src' directory to find all source files.
src = [os.path.join(d, f) for d, base, files in os.walk('src')
for f in files if f.endswith('.c')]
# initialize the extra compile arguments.
cflags = ['-std=c99', '-O3', '-Wall']
# initialize the libraries to link against.
libs = []
# initialize the macro definitions.
defs = []
# check if the user specified the use of ATLAS.
if '--with-atlas' in sys.argv:
defs.append(('__VFL_USE_ATLAS', None))
libs.append('tatlas')
sys.argv.remove('--with-atlas')
# check if the user specified the use of OpenCL.
if '--with-opencl' in sys.argv:
defs.append(('__VFL_USE_OPENCL', None))
libs.append('OpenCL')
sys.argv.remove('--with-opencl')
# define the vfl extension module.
vfl_extension = Extension(
name = 'vfl',
extra_compile_args = cflags,
define_macros = defs,
include_dirs = inc,
libraries = libs,
sources = src
)
# run the setup function.
setup(
# package name and version.
name = 'vfl',
version = '0.0.1',
# package descriptions.
description = 'Variational Feature Learning',
long_description = '''
''',
# project uniform resource locator.
url = 'http://github.com/geekysuavo/vfl',
# project author.
author = 'Bradley Worley',
author_email = '[email protected]',
# project license.
license = 'MIT',
# project classification.
classifiers = [
'Development Status :: 1 - Planning',
'Environment :: Console',
'Intended Audience :: Developers',
'Intended Audience :: Science/Research',
'Topic :: Scientific/Engineering :: Mathematics',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6'
],
# project test suite.
test_suite = 'tests',
# project package and extension module list.
ext_modules = [vfl_extension]
)