forked from golemfactory/clay
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
executable file
·103 lines (92 loc) · 3.53 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
#!/usr/bin/env python
import sys
from setuptools import setup
from setup_util.setup_commons import (
path, parse_requirements, get_version,
get_long_description, find_required_packages, PyInstaller,
move_wheel, print_errors, DatabaseMigration)
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 sys.argv
building_binary = 'pyinstaller' in sys.argv
building_migration = 'migration' in sys.argv
directory = path.abspath(path.dirname(__file__))
requirements, dependencies = parse_requirements(directory)
task_collector_err = TaskCollectorBuilder().build()
setup(
name='golem',
version=get_version(),
platforms=sys.platform,
description='Global, open sourced, decentralized supercomputer',
long_description=get_long_description(directory),
url='https://golem.network',
author='Golem Team',
author_email='contact@golem.network',
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 :: 3.6',
],
zip_safe=False,
keywords='golem',
packages=find_required_packages(),
install_requires=requirements,
dependency_links=dependencies,
include_package_data=True,
cmdclass={
'pyinstaller': PyInstaller,
'migration': DatabaseMigration
},
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/rendering/benchmark/minilight'), [
path.normpath('apps/rendering/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/apps/dummy/resources/scripts'), [
path.normpath('apps/dummy/resources/scripts/docker_dummytask.py')
]),
(path.normpath('../../golem/apps/dummy/resources/code_dir'), [
path.normpath('apps/dummy/resources/code_dir/computing.py')
]),
(path.normpath('../../golem/apps/dummy/test_data'), [
path.normpath('apps/dummy/test_data/in.data')
]),
]
)
if not (in_appveyor() or in_travis() or
building_wheel or building_binary):
DockerManager.pull_images()
if building_wheel:
move_wheel()
if not building_migration:
from golem.database.migration.create import latest_migration_exists
if not latest_migration_exists():
raise RuntimeError("Database schema error: latest migration script "
"does not exist")
print_errors(task_collector_err)