forked from mbdriscoll/ctree
-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathsetup.py
More file actions
85 lines (70 loc) · 2.42 KB
/
setup.py
File metadata and controls
85 lines (70 loc) · 2.42 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
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
#from distutils.core import setup
from setuptools import setup
def make_data_file_list(target, source):
"""
creates a list of tuples (target_directory, file_list)
that setup should copy into the egg in
the install process. Gets around no way to specify a recursive
directory tree copy, directories must be created by
name on left side of tuple against an empty file list on the right
"""
import os
def visit(destination_directory, source_directory):
# print destination_directory + " " + source_directory
files = os.listdir(source_directory)
transfer_list = []
todo = []
for file_name in files:
# print type(file_name)
source_file = os.path.join(source_directory, file_name)
# print "source_file " + source_file
next_destination_directory = os.path.join(destination_directory, file_name)
if file_name.startswith("__") and file_name != '__init__.py':
pass
elif os.path.isdir(source_file):
transfer_list.append((next_destination_directory, []))
todo.append((next_destination_directory, source_file))
elif os.path.isfile(source_file):
transfer_list.append((destination_directory, [source_file]))
for next_target, next_source in todo:
transfer_list += visit(next_target, next_source)
return transfer_list
return visit(target, source)
data_file_list = make_data_file_list("ctree/tools/generators/templates", "ctree/tools/generators/templates")
# import pprint
# pprint.pprint(data_file_list)
setup(
name='ctree',
version='0.1.9',
description='A C-family AST implementation designed to be an IR for DSL compilers.',
packages=[
'ctree',
'ctree.c',
'ctree.cilk',
'ctree.cpp',
'ctree.ocl',
'ctree.omp',
'ctree.py',
'ctree.np',
'ctree.simd',
'ctree.templates',
'ctree.opentuner',
'ctree.metrics',
'ctree.tools',
'ctree.tools.generators',
'ctree.tools.generators.templates',
'ctree.transforms',
'ctree.visual',
],
package_data={
'ctree': ['defaults.cfg'],
},
install_requires=[
'numpy',
'pyserial'
],
data_files=data_file_list,
entry_points={
'console_scripts': ['ctree = ctree.tools.runner:main'],
}
)