forked from cms-dev/cms
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
executable file
·168 lines (156 loc) · 6.91 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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Contest Management System - http://cms-dev.github.io/
# Copyright © 2010-2013 Giovanni Mascellani <[email protected]>
# Copyright © 2010-2016 Stefano Maggiolo <[email protected]>
# Copyright © 2010-2012 Matteo Boscariol <[email protected]>
# Copyright © 2013 Luca Wehrstedt <[email protected]>
# Copyright © 2014 Artem Iglikov <[email protected]>
# Copyright © 2015 William Di Luigi <[email protected]>
# Copyright © 2016 Myungwoo Chun <[email protected]>
# Copyright © 2016 Masaki Hara <[email protected]>
# Copyright © 2016 Peyman Jabbarzade Ganje <[email protected]>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
"""Build and installation routines for CMS.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
# setuptools doesn't seem to like this:
# from __future__ import unicode_literals
from future.builtins.disabled import *
from future.builtins import *
import io
import re
import os
from setuptools import setup, find_packages
PACKAGE_DATA = {
"cms.server": [
os.path.join("static", "*.*"),
os.path.join("static", "jq", "*.*"),
os.path.join("admin", "static", "*.*"),
os.path.join("admin", "static", "jq", "*.*"),
os.path.join("admin", "static", "sh", "*.*"),
os.path.join("admin", "templates", "*.*"),
os.path.join("admin", "templates", "fragments", "*.*"),
os.path.join("admin", "templates", "views", "*.*"),
os.path.join("contest", "static", "*.*"),
os.path.join("contest", "static", "css", "*.*"),
os.path.join("contest", "static", "img", "*.*"),
os.path.join("contest", "static", "img", "mimetypes", "*.*"),
os.path.join("contest", "static", "js", "*.*"),
os.path.join("contest", "templates", "*.*"),
],
"cms.service": [
os.path.join("templates", "printing", "*.*"),
],
"cms.locale": [
os.path.join("*", "LC_MESSAGES", "*.*"),
],
"cmsranking": [
os.path.join("static", "img", "*.*"),
os.path.join("static", "lib", "*.*"),
os.path.join("static", "*.*"),
],
"cmstestsuite": [
os.path.join("code", "*.*"),
os.path.join("tasks", "batch_stdio", "data", "*.*"),
os.path.join("tasks", "batch_fileio", "data", "*.*"),
os.path.join("tasks", "batch_fileio_managed", "code", "*"),
os.path.join("tasks", "batch_fileio_managed", "data", "*.*"),
os.path.join("tasks", "communication", "code", "*"),
os.path.join("tasks", "communication", "data", "*.*"),
os.path.join("tasks", "communication2", "code", "*"),
os.path.join("tasks", "communication2", "data", "*.*"),
],
}
def find_version():
"""Return the version string obtained from cms/__init__.py"""
path = os.path.join("cms", "__init__.py")
version_file = io.open(path, "rt", encoding="utf-8").read()
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]",
version_file, re.M)
if version_match is not None:
return version_match.group(1)
raise RuntimeError("Unable to find version string.")
setup(
name="cms",
version=find_version(),
author="The CMS development team",
author_email="[email protected]",
url="https://github.com/cms-dev/cms",
download_url="https://github.com/cms-dev/cms/archive/master.tar.gz",
description="A contest management system and grader "
"for IOI-like programming competitions",
packages=find_packages(),
package_data=PACKAGE_DATA,
scripts=["scripts/cmsLogService",
"scripts/cmsScoringService",
"scripts/cmsEvaluationService",
"scripts/cmsWorker",
"scripts/cmsResourceService",
"scripts/cmsChecker",
"scripts/cmsContestWebServer",
"scripts/cmsAdminWebServer",
"scripts/cmsProxyService",
"scripts/cmsPrintingService",
"scripts/cmsRankingWebServer",
"scripts/cmsInitDB",
"scripts/cmsDropDB"],
entry_points={
"console_scripts": [
"cmsRunTests=cmstestsuite.RunTests:main",
"cmsAddAdmin=cmscontrib.AddAdmin:main",
"cmsAddParticipation=cmscontrib.AddParticipation:main",
"cmsAddStatement=cmscontrib.AddStatement:main",
"cmsAddSubmission=cmscontrib.AddSubmission:main",
"cmsAddTeam=cmscontrib.AddTeam:main",
"cmsAddTestcases=cmscontrib.AddTestcases:main",
"cmsAddUser=cmscontrib.AddUser:main",
"cmsCleanFiles=cmscontrib.CleanFiles:main",
"cmsComputeComplexity=cmscontrib.ComputeComplexity:main",
"cmsDumpExporter=cmscontrib.DumpExporter:main",
"cmsDumpImporter=cmscontrib.DumpImporter:main",
"cmsDumpUpdater=cmscontrib.DumpUpdater:main",
"cmsExportSubmissions=cmscontrib.ExportSubmissions:main",
"cmsImportContest=cmscontrib.ImportContest:main",
"cmsImportDataset=cmscontrib.ImportDataset:main",
"cmsImportTask=cmscontrib.ImportTask:main",
"cmsImportTeam=cmscontrib.ImportTeam:main",
"cmsImportUser=cmscontrib.ImportUser:main",
"cmsRWSHelper=cmscontrib.RWSHelper:main",
"cmsRemoveContest=cmscontrib.RemoveContest:main",
"cmsRemoveParticipation=cmscontrib.RemoveParticipation:main",
"cmsRemoveSubmissions=cmscontrib.RemoveSubmissions:main",
"cmsRemoveTask=cmscontrib.RemoveTask:main",
"cmsRemoveUser=cmscontrib.RemoveUser:main",
"cmsSpoolExporter=cmscontrib.SpoolExporter:main",
"cmsMake=cmstaskenv.cmsMake:main",
"cmsYamlImporter=cmscompat.YamlImporter:main",
"cmsYamlReimporter=cmscompat.YamlReimporter:main",
]
},
keywords="ioi programming contest grader management system",
license="Affero General Public License v3",
classifiers=[
"Development Status :: 5 - Production/Stable",
"Natural Language :: English",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3.6",
"License :: OSI Approved :: "
"GNU Affero General Public License v3",
]
)