forked from sio2project/oioioi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
125 lines (98 loc) · 3.22 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
# -*- coding: utf-8 -*-
from __future__ import print_function
try:
from setuptools import setup, find_packages
except ImportError:
from ez_setup import use_setuptools
use_setuptools()
from setuptools import setup, find_packages
import os
import sys
if os.getuid() == 0: # root
print("ERROR: This setup.py cannot be run as root.", file=sys.stderr)
print("ERROR: If you want to proceed anyway, hunt this", file=sys.stderr)
print("ERROR: message and edit the source at your own risk.", file=sys.stderr)
sys.exit(2)
PYTHON_VERSION = sys.version_info[0]
python2_specific_requirements = [
"pdfminer>=20110515,<20131113",
"slate",
"django-supervisor",
"supervisor",
]
python3_specific_requirements = [
"pdfminer3k",
"slate3k",
]
python23_universal_requirements = [
"Django>=1.9,<1.10", # when upgrading, upgrade also django-two-factor-auth!
"pytz>=2013b",
"sqlalchemy",
"django-otp==0.3.4", # latest version for Django 1.9 and django-two-factor-auth 1.5.0
"beautifulsoup4",
"PyYAML",
"python-dateutil",
"django-two-factor-auth==1.5.0", # latest version for Django 1.9
"django-registration-redux>=1.6,<2.0",
"Celery>=3.1.15,<4.0.0",
"django-celery>=3.1.15,<=3.1.17",
"dj-pagination",
"django-compressor==2.2",
"django-overextends>=0.4.1",
"pygments",
"django-libsass>=0.7",
"django-debug-toolbar>=1.4,<1.10", # latest version for Django 1.9
"django-extensions>=1.0.0",
"werkzeug",
'pytest',
'pytest-django',
'pytest-html',
'pytest-xdist',
'pytest-cov',
'requests',
# http://stackoverflow.com/questions/31417964/importerror-cannot-import-name-wraps
# ¯\_(ツ)_/¯
"mock==1.0.1",
"fpdf",
"unicodecsv",
"shortuuid",
"enum34",
"dnslib",
"bleach==1.5",
"chardet",
"django-gravatar2",
"django-mptt>=0.8.7,<0.9.1",
"mistune",
# Some of celery dependencies (kombu) require amqp to be <2.0.0
"amqp<2.0.0",
"pika",
"raven",
"unidecode",
# A library allowing to nest inlines in django admin.
# Used in quizzes module for adding new quizzes.
"django-nested-admin",
# SIO2 dependencies:
"filetracker>=2.1,<3.0",
# Dependencies from external sources live in requirements.txt
]
if PYTHON_VERSION == 2:
final_requirements = python23_universal_requirements + python2_specific_requirements
else:
final_requirements = python23_universal_requirements + python3_specific_requirements
setup(
name='oioioi',
version='0.1.1.dev',
description='The web frontend of the SIO2 Project contesting system',
author='The SIO2 Team',
author_email='[email protected]',
url='http://sio2project.mimuw.edu.pl',
install_requires=final_requirements,
packages=find_packages(exclude=['ez_setup']),
include_package_data=True,
test_suite='oioioi.runtests.runtests',
entry_points={
'console_scripts': [
'oioioi-create-config = oioioi.deployment.create_config:main',
],
},
)