forked from stackdio/stackdio-python-client
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.py
More file actions
92 lines (78 loc) · 3.01 KB
/
setup.py
File metadata and controls
92 lines (78 loc) · 3.01 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
# -*- coding: utf-8 -*-
# Copyright 2014, 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.
#
import os
import sys
from setuptools import setup, find_packages
from pip.req import parse_requirements
from pip.download import PipSession
def test_python_version():
if float("%d.%d" % sys.version_info[:2]) < 2.6:
print('Your Python version {0}.{1}.{2} is not supported.'.format(
*sys.version_info[:3]))
print('stackdio requires Python 2.6 or newer.')
sys.exit(1)
def load_pip_requirements(fp):
reqs, deps = [], []
for r in parse_requirements(fp, session=PipSession()):
if r.url is not None:
deps.append(str(r.url))
reqs.append(str(r.req))
return reqs, deps
# Set version
__version__ = '0.0.0' # Explicit default
execfile("stackdio/client/version.py")
SHORT_DESCRIPTION = ('A cloud deployment, automation, and orchestration '
'platform for everyone.')
LONG_DESCRIPTION = SHORT_DESCRIPTION
# If we have a README.md file, use its contents as the long description
if os.path.isfile('README.md'):
with open('README.md') as f:
LONG_DESCRIPTION = f.read()
if __name__ == "__main__":
# build our list of requirements and dependency links based on our
# requirements.txt file
reqs, deps = load_pip_requirements('requirements.txt')
# Call the setup method from setuptools that does all the heavy lifting
# of packaging stackdio
setup(
name='stackdio',
version=__version__,
url='http://stackd.io',
author='Digital Reasoning Systems, Inc.',
author_email='[email protected]',
description=SHORT_DESCRIPTION,
long_description=LONG_DESCRIPTION,
license='Apache 2.0',
include_package_data=True,
packages=find_packages(),
zip_safe=False,
install_requires=reqs,
dependency_links=deps,
classifiers=[
'Development Status :: 3 - Alpha',
'Environment :: Web Environment',
'Framework :: Django',
'Intended Audience :: Developers',
'Intended Audience :: Information Technology',
'Intended Audience :: System Administrators',
'License :: OSI Approved :: Apache Software License',
'Programming Language :: Python',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Topic :: System :: Clustering',
'Topic :: System :: Distributed Computing',
]
)