forked from sio2project/sioworkers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
142 lines (117 loc) · 4.65 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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
from __future__ import absolute_import
from sys import version_info
from setuptools import setup, find_packages
PYTHON_VERSION = version_info[0]
python2_specific_requirements = [
'enum34>=1.1,<1.2',
]
python3_specific_requirements = [
'bsddb3==6.2.7',
]
python23_universal_requirements = [
'filetracker>=2.1.5,<3.0',
'simplejson==3.14.0',
'supervisor>=4.0,<4.3',
'Twisted==20.3.0',
'sortedcontainers==2.1.0',
'six',
'pytest>=4.6,<4.7',
'pytest-runner==5.1',
'pytest-timeout==1.3.3',
'urllib3<2.0', # urllib3 will drop support for python2 in version 2.0.
]
if PYTHON_VERSION == 2:
final_requirements = python23_universal_requirements + python2_specific_requirements
else:
final_requirements = python23_universal_requirements + python3_specific_requirements
setup(
name = "sioworkers",
version = '1.4.1',
author = "SIO2 Project Team",
author_email = '[email protected]',
description = "Programming contest judging infrastructure",
url = 'https://github.com/sio2project/sioworkers',
license = 'GPL',
# we need twisted.plugins in packages to install the sio twisted command
packages = find_packages() + ['twisted.plugins'],
namespace_packages = ['sio', 'sio.compilers', 'sio.executors'],
install_requires=final_requirements,
setup_requires = [
'pytest-runner',
],
tests_require = [
'pytest',
'pytest-timeout'
],
entry_points = {
'sio.jobs': [
'ping = sio.workers.ping:run',
'compile = sio.compilers.job:run',
'exec = sio.executors.executor:run',
'sio2jail-exec = sio.executors.sio2jail_exec:run',
'cpu-exec = sio.executors.executor:run',
'unsafe-exec = sio.executors.unsafe_exec:run',
'ingen = sio.executors.ingen:run',
'inwer = sio.executors.inwer:run',
],
'sio.compilers': [
# Example compiler:
'foo = sio.compilers.template:run',
# Sandboxed compilers:
'gcc4_8_2_c99 = sio.compilers.gcc:run_c_gcc4_8_2_c99',
'g++4_8_2_cpp11 = sio.compilers.gcc:run_cpp_gcc4_8_2_cpp11',
'fpc2_6_2 = sio.compilers.fpc:run_pas_fpc2_6_2',
'java1_8 = sio.compilers.java:run_java1_8',
# Non-sandboxed compilers
'system-gcc = sio.compilers.system_gcc:run_gcc',
'system-g++ = sio.compilers.system_gcc:run_gplusplus',
'system-fpc = sio.compilers.system_fpc:run',
'system-java = sio.compilers.system_java:run',
# Compiler for output only tasks solutions
'output-only = sio.compilers.output:run',
####################################
# Deprecated, should be removed after 01.01.2021
# Default extension compilers:
'default-c = sio.compilers.gcc:run_c_default',
'default-cc = sio.compilers.gcc:run_cpp_default',
'default-cpp = sio.compilers.gcc:run_cpp_default',
'default-pas = sio.compilers.fpc:run_pas_default',
'default-java = sio.compilers.java:run_java_default',
####################################
# Deprecated, should be removed after 01.01.2021
# Sandboxed compilers:
'c = sio.compilers.gcc:run_c_default',
'cc = sio.compilers.gcc:run_cpp_default',
'cpp = sio.compilers.gcc:run_cpp_default',
'pas = sio.compilers.fpc:run_pas_default',
'java = sio.compilers.java:run_java_default',
####################################
# Deprecated, should be removed after 01.01.2021
# Non-sandboxed compilers
'system-c = sio.compilers.system_gcc:run_gcc',
'system-cc = sio.compilers.system_gcc:run_gplusplus',
'system-cpp = sio.compilers.system_gcc:run_gplusplus',
'system-pas = sio.compilers.system_fpc:run',
####################################
],
'console_scripts': [
'sio-batch = sio.workers.runner:main',
'sio-run-filetracker = sio.workers.ft:launch_filetracker_server',
'sio-get-sandbox = sio.workers.sandbox:main',
'sio-compile = sio.compilers.job:main',
'sio-celery-worker = sio.celery.worker:main',
]
}
)
# Make Twisted regenerate the dropin.cache, if possible. This is necessary
# because in a site-wide install, dropin.cache cannot be rewritten by
# normal users.
try:
from twisted.plugin import IPlugin, getPlugins
except ImportError:
pass
# HACK: workaround for hudson
except TypeError:
pass
else:
list(getPlugins(IPlugin))