-
Notifications
You must be signed in to change notification settings - Fork 5
/
setup.py
62 lines (55 loc) · 2.47 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
import sys
from pathlib import Path
from pkg_resources import resource_filename
if not sys.version_info[0] == 3:
sys.exit("Sorry, only Python 3 is supported.")
missing = []
try:
from setuptools import setup
except:
missing.append("setuptools")
if len(missing) > 0:
sys.exit("Sorry, your python environment is not ready: install %s with pip first." % \
" and ".join(missing))
proj_dir = Path(resource_filename(__name__, 'setup.py')).resolve().parent
def find_packages():
return sorted(set(str(f.parent.relative_to(proj_dir)) for f in proj_dir.glob('sakura/**/*.py')))
def iter_data_files(dirname):
# iterate over files of web_interface
for d in sorted(set(f.parent.relative_to(proj_dir) for f in proj_dir.glob(dirname + '/**/*'))):
files = list(str(f) for f in d.iterdir() \
if f.is_file() \
and not f.name.startswith('gitignore'))
if len(files) == 0:
continue
dest_path = 'sakura/' + str(d)
yield (dest_path, files)
setup(
name = 'sakura-py',
version = '0.9.6',
packages = find_packages(),
package_dir = {'sakura-py': 'sakura'},
data_files = list(iter_data_files('web_interface')) + list(iter_data_files('operators')),
setup_requires = [ 'wheel' ],
install_requires = [ 'wheel', 'gevent', 'bottle', 'numpy', 'websocket-client', 'geojson' ],
extras_require = {
'hub': [ 'pony==0.7.6', 'gevent-websocket', 'ldap3' ],
'daemon': [ 'cffi', 'psycopg2-binary', 'pillow-simd', 'cython', 'pyopengl', 'pyopengl-accelerate', 'requests' ]
},
author = 'Etienne Duble',
author_email = '[email protected]',
keywords = 'sakura data-processing research capitalization',
license = 'BSD',
url = 'https://github.com/sakura-team/sakura',
description = 'Sakura platform installation files.',
entry_points = dict(
console_scripts = [ 'sakura-hub = sakura.hub.hub:run [hub]',
'sakura-hub-sendmail = sakura.hub.sendmail:run [hub]',
'sakura-daemon = sakura.daemon.daemon:run [daemon]',
'sakura-encode-password = sakura.common.password:password_encoder_tool',
'sakura-shell = sakura.client.shell:run',
'sakura-op-skeleton = sakura.client.opskeleton:run',
'sakura-sandbox = sakura.client.sandbox:run' ]
),
include_package_data = True
)