forked from jtambasco/ipkiss
-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
66 lines (55 loc) · 1.59 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
#!/usr/bin/env python
import os
from distutils.core import setup
packages = [
'ipkiss',
'ipcore',
'genericpdk',
'technologies',
'dependencies',
'picazzo',
'pysics',
'pysimul',
'samples',
# 'testsuite',
'descartes',
]
def list_folders(root):
acc = []
for f in os.listdir(root):
if f != '_tests':
full_name = os.path.join(root, f)
if os.path.isdir(full_name):
acc.append(full_name)
acc += list_folders(full_name)
return acc
def write_manifest(filename="MANIFEST.in"):
with open(filename, 'w') as blah:
for p in packages:
blah.write("recursive-include ipkiss24\\%s \n" % p)
package_dir = {}
for p in packages:
root = os.path.join("ipkiss24", p)
package_dir[p] = root
subpackages = list_folders(root)
for s in subpackages:
name = s.replace(os.sep,'.')
if name.startswith("ipkiss24."):
name = name.replace("ipkiss24.","",1)
package_dir[name] = s
package_data = {}
for package in package_dir:
package_data[package] = ['*.gds', '*.pyc', "*.xml"]
setup(name='IPKISS',
version='2.4-ce',
description='IPKISS Framework',
author='Intec - Ugent',
author_email='ipkiss@intec.ugent.be',
url='www.ipkiss.org',
license="GPL",
extra_path="ipkiss24",
packages=package_dir.keys(),
package_dir=package_dir,
package_data=package_data,
data_files=[('ipkiss24', ['LICENSE.txt',]),]
)