-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathsetup.py
More file actions
169 lines (149 loc) · 5.05 KB
/
setup.py
File metadata and controls
169 lines (149 loc) · 5.05 KB
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
169
# -*- coding: utf-8 -*-
# Copyright 2017, Digital Reasoning
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
from __future__ import print_function, unicode_literals
import os
import sys
from setuptools import setup, find_packages
major = sys.version_info[0]
minor = sys.version_info[1]
micro = sys.version_info[2]
supported_versions = [
(2, 7),
(3, 4),
(3, 5),
(3, 6),
]
if (major, minor) not in supported_versions:
err_msg = ('Your Python version {0}.{1}.{2} is not supported.\n'
'stackdio-server requires Python 2.7, 3.4, 3.5, or 3.6.\n'.format(major, minor, micro))
sys.stderr.write(err_msg)
sys.exit(1)
root_dir = os.path.dirname(os.path.abspath(__file__))
bower_dir = 'stackdio/ui/static/stackdio/lib/bower_components'
components_dir = os.path.join(root_dir, bower_dir)
# Force the user to install bower components first
if not os.path.exists(components_dir):
err_msg = ('It looks like you haven\'t installed the bower dependencies yet. Please run '
'`bower install` before using setup.py.\n')
sys.stderr.write(err_msg)
sys.exit(1)
# Grab the current version from our stackdio package
from stackdio.server import __version__
VERSION = __version__
# Short and long descriptions for our package
SHORT_DESCRIPTION = 'A cloud deployment, automation, and orchestration platform for everyone.'
# Grab README.md and use its contents as the long description
with open('README.rst') as f:
LONG_DESCRIPTION = f.read()
requirements = [
# Heavily used, hold to a specific minor version (let the patch version update)
'celery[redis]~=3.1.0',
'Django~=1.9.0',
'djangorestframework~=3.4.0',
'salt~=2016.3.0,!=2016.3.3,!=2016.3.6,!=2016.3.7,!=2016.3.8',
'tornado<5', # salt doesn't work with tornado 5, but it's dependencies don't show that
'pyzmq<17', # salt emits warnings on pyzmq 17
# Used, but still hold an upper bound on the version
'boto~=2.32',
'boto3~=1.4.0',
'django-activity-stream~=0.6.0',
'django-extensions~=1.6.0',
'django-filter~=0.9',
'django-guardian~=1.4.2',
'django-model-utils~=2.0',
'django-redis-cache~=1.7.0',
'Jinja2~=2.0',
# Light usage, no need to have an upper bound on the version
'dj-database-url>=0.3',
'envoy',
'GitPython>=2.0',
'Markdown>=2.6',
'PyYAML>=3.10',
'requests>=2.4',
'six>=1.6',
]
testing_requirements = [
'coveralls',
'mock',
'pycodestyle',
'pylint',
'pytest',
'pytest-cov',
'pytest-django',
]
# Call the setup method from setuptools that does all the heavy lifting
# of packaging stackdio
setup(
name='stackdio-server',
version=VERSION,
url='http://stackd.io',
author='Digital Reasoning Systems, Inc.',
description=SHORT_DESCRIPTION,
long_description=LONG_DESCRIPTION,
license='Apache 2.0',
include_package_data=True,
packages=find_packages(exclude=('tests', 'dist', 'build', 'docs')),
zip_safe=False,
install_requires=requirements,
extras_require={
'production': [
'gunicorn>=19.0',
'supervisor>=3.0',
],
'mysql': [
'mysqlclient>=1.3.3',
],
'postgresql': [
'psycopg2>=2.5.0',
],
'ldap': [
'django-auth-ldap~=1.2.7',
],
'slack': [
'slackclient>=1.0.0',
],
'development': testing_requirements + ['ipython>=2.0'],
'testing': testing_requirements,
},
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Web Environment',
'Framework :: Django',
'Framework :: Django :: 1.8',
'Intended Audience :: Developers',
'Intended Audience :: Information Technology',
'Intended Audience :: System Administrators',
'License :: OSI Approved :: Apache Software License',
'Operating System :: POSIX :: Linux',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 2 :: Only',
'Topic :: System :: Clustering',
'Topic :: System :: Distributed Computing',
],
entry_points={
'console_scripts': [
'stackdio = stackdio.server.management:main',
],
'salt.loader': [
'fileserver_dirs = stackdio.salt.extension_loader:fileserver_dirs',
'pillar_dirs = stackdio.salt.extension_loader:pillar_dirs',
'wheel_dirs = stackdio.salt.extension_loader:wheel_dirs',
],
}
)