-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathsetup.py
executable file
·74 lines (63 loc) · 2.13 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
#!/usr/bin/env python
#
# -*- mode:python; sh-basic-offset:4; indent-tabs-mode:nil; coding:utf-8 -*-
# vim:set tabstop=4 softtabstop=4 expandtab shiftwidth=4 fileencoding=utf-8:
#
import os
import pip.download
import pip.req
import pkg_resources
import setuptools
import sys
import clustoapi
reqs = 'requirements.txt'
for arg in sys.argv[1:]:
if arg == 'test':
reqs = 'test-requirements.txt'
if arg == 'develop':
reqs = 'dev-requirements.txt'
readme = os.path.join(os.path.dirname(sys.argv[0]), 'README.rst')
reqs = os.path.join(os.path.dirname(sys.argv[0]), reqs)
# parse_requirements takes a required kwarg for pip >= 6.0.0
if pkg_resources.get_distribution("pip").version >= '6.0.0':
install_requires = pip.req.parse_requirements(reqs, session=pip.download.PipSession())
else:
install_requires = pip.req.parse_requirements(reqs)
dependency_links = set([str(_.url) for _ in install_requires if 'url' in dir(_)])
install_requires = set([str(_.req) for _ in install_requires])
# These two were introduced in 2.7
if sys.version_info < (2, 7):
install_requires.extend([
'importlib',
'argparse'
])
setuptools.setup(
name='clusto-apiserver',
url='https://github.com/clusto/clusto-apiserver',
version=clustoapi.__version__,
packages=setuptools.find_packages(),
author=clustoapi.__authors__[0][1],
author_email=clustoapi.__authors__[0][0],
description=clustoapi.__desc__,
long_description=open(readme).read(),
license='BSD',
install_requires=install_requires,
dependency_links=dependency_links,
entry_points={
'console_scripts': [
'clusto-apiserver=clustoapi.server:main'
],
},
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Web Environment',
'Framework :: Bottle',
'Intended Audience :: System Administrators',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Topic :: Internet :: WWW/HTTP :: WSGI :: Application',
],
zip_safe=False,
test_suite='tests.all.test_suites',
)