forked from docker-archive/docker-registry
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
84 lines (71 loc) · 2.68 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
#!/usr/bin/env python
# -*- coding: utf-8 -*-
try:
import setuptools
except ImportError:
import distutils.core as setuptools
import sys
# XXX as ugly as this looks, namespaces break terribly otherwise
# import docker_registry.lib as lib
execfile('./docker_registry/server/__init__.py')
requirements_txt = open('./requirements/main.txt')
requirements = [line for line in requirements_txt]
ver = sys.version_info
if ver[0] == 2:
# Python 2 requires lzma backport
requirements.insert(0, 'backports.lzma>=0.0.2')
if ver[1] <= 6:
# Python 2.6 requires additional libraries
requirements.insert(0, 'argparse>=1.2.1')
requirements.insert(0, 'importlib>=1.0.3')
# Require core (the reason this is out of req.txt is to ease tox)
requirements.insert(0, 'docker-registry-core>=2,<3')
# Explicit packages list to avoid setup_tools funkyness
packages = ['docker_registry',
'docker_registry.drivers',
'docker_registry.server',
'docker_registry.lib',
'docker_registry.storage',
'docker_registry.lib.index']
namespaces = ['docker_registry', 'docker_registry.drivers']
package_data = {'docker_registry': ['../config/*']}
setuptools.setup(
name=__title__, # noqa
version=__version__, # noqa
author=__author__, # noqa
author_email=__email__, # noqa
maintainer=__maintainer__, # noqa
maintainer_email=__email__, # noqa
url=__url__, # noqa
description=__description__, # noqa
download_url=__download__, # noqa
long_description=open('./README.md').read(),
namespace_packages=namespaces,
packages=packages,
package_data=package_data,
entry_points={
'console_scripts': [
'docker-registry = docker_registry.run:run_gunicorn'
]
},
classifiers=['Development Status :: 4 - Beta',
'Intended Audience :: Developers',
# 'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
# 'Programming Language :: Python :: 3.2',
# 'Programming Language :: Python :: 3.3',
# 'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: Implementation :: CPython',
'Operating System :: OS Independent',
'Topic :: Utilities',
'License :: OSI Approved :: Apache Software License'],
platforms=['Independent'],
license=open('./LICENSE').read(),
zip_safe=False,
test_suite='nose.collector',
install_requires=requirements,
tests_require=open('./requirements/test.txt').read(),
extras_require={
'bugsnag': ['bugsnag==2.0.1']
}
)