forked from golemfactory/clay
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
executable file
·111 lines (98 loc) · 3.6 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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
#!/usr/bin/env python
from sys import argv
from setuptools import setup
from setup_util.setup_commons import (
path, parse_requirements, generate_ui, platform, update_variables,
get_version, get_long_description, find_required_packages, PyTest,
PyInstaller, move_wheel, print_errors)
from setup_util.taskcollector_builder import TaskCollectorBuilder
from golem.docker.manager import DockerManager
from golem.tools.ci import in_appveyor, in_travis
building_wheel = 'bdist_wheel' in argv
building_binary = 'pyinstaller' in argv
directory = path.abspath(path.dirname(__file__))
requirements, dependencies = parse_requirements(directory)
task_collector_err = TaskCollectorBuilder().build()
if building_wheel or building_binary:
ui_err = generate_ui()
update_variables()
setup(
name='golem',
version=get_version(),
platforms=platform,
description='Global, open sourced, decentralized supercomputer',
long_description=get_long_description(directory),
url='https://golem.network',
author='Golem Team',
author_email='[email protected]',
license="GPL-3.0",
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
'Natural Language :: English',
'Programming Language :: Python :: 2.7',
],
zip_safe=False,
keywords='golem',
packages=find_required_packages(),
install_requires=requirements,
dependency_links=dependencies,
# @todo remove test dependencies from requirements.txt and add here
# extras_require={
# 'dev': ['check-manifest'],
# 'test': ['coverage'],
# },
include_package_data=True,
cmdclass={
'test': PyTest,
'pyinstaller': PyInstaller
},
test_suite='tests',
tests_require=['mock', 'pytest'],
entry_points={
'gui_scripts': [
'golemapp = golemapp:start',
],
'console_scripts': [
'golemcli = golemcli:start',
]
},
data_files=[
(path.normpath('../../'), [
'golemapp.py', 'golemcli.py', 'loggingconfig.py'
]),
(path.normpath('../../golem/apps'), [
path.normpath('apps/registered.ini'),
path.normpath('apps/images.ini')
]),
(path.normpath('../../golem/apps/core/benchmark/minilight'), [
path.normpath('apps/core/benchmark/minilight/cornellbox.ml.txt'),
]),
(path.normpath('../../golem/apps/blender/resources/scripts'), [
path.normpath('apps/blender/resources/scripts/blendercrop.py.template'),
path.normpath('apps/blender/resources/scripts/docker_blendertask.py')
]),
(path.normpath('../../golem/apps/lux/resources/scripts'), [
path.normpath('apps/lux/resources/scripts/docker_luxtask.py'),
path.normpath('apps/lux/resources/scripts/docker_luxmerge.py')
]),
(path.normpath('../../golem/gui/view/'), [
path.normpath('gui/view/nopreview.png')
]),
(path.normpath('../../golem/gui/view/img'), [
path.normpath('gui/view/img/' + f) for f in [
'favicon-256x256.png', 'favicon-48x48.png', 'favicon-32x32.png',
'settings.png', 'task.png', 'user.png', 'new.png', 'eye.png'
]
]),
]
)
if not (in_appveyor() or in_travis() or
building_wheel or building_binary):
DockerManager.pull_images()
if not (building_wheel or building_binary):
ui_err = generate_ui()
elif building_wheel:
move_wheel()
print_errors(ui_err, task_collector_err)