2013-12-09 12:41:05 +01:00
|
|
|
#!/usr/bin/env python
|
|
|
|
# -*- coding: utf-8 -*-
|
2014-01-06 03:26:32 +01:00
|
|
|
from __future__ import absolute_import
|
2017-02-10 23:05:33 +01:00
|
|
|
from __future__ import print_function
|
2015-08-24 21:25:25 +02:00
|
|
|
from __future__ import unicode_literals
|
|
|
|
|
2013-12-09 12:41:05 +01:00
|
|
|
import codecs
|
2014-07-30 22:11:11 +02:00
|
|
|
import os
|
|
|
|
import re
|
|
|
|
import sys
|
2013-12-09 12:41:05 +01:00
|
|
|
|
2016-11-22 12:09:56 +01:00
|
|
|
import pkg_resources
|
2015-08-24 21:25:25 +02:00
|
|
|
from setuptools import find_packages
|
|
|
|
from setuptools import setup
|
|
|
|
|
2013-12-09 12:41:05 +01:00
|
|
|
|
|
|
|
def read(*parts):
|
2014-01-06 03:26:32 +01:00
|
|
|
path = os.path.join(os.path.dirname(__file__), *parts)
|
|
|
|
with codecs.open(path, encoding='utf-8') as fobj:
|
|
|
|
return fobj.read()
|
2013-12-09 12:41:05 +01:00
|
|
|
|
|
|
|
|
|
|
|
def find_version(*file_paths):
|
|
|
|
version_file = read(*file_paths)
|
|
|
|
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]",
|
|
|
|
version_file, re.M)
|
|
|
|
if version_match:
|
|
|
|
return version_match.group(1)
|
|
|
|
raise RuntimeError("Unable to find version string.")
|
|
|
|
|
2014-07-29 19:28:55 +02:00
|
|
|
|
|
|
|
install_requires = [
|
2016-01-13 20:41:34 +01:00
|
|
|
'cached-property >= 1.2.0, < 2',
|
2016-10-25 01:27:47 +02:00
|
|
|
'colorama >= 0.3.7, < 0.4',
|
2014-07-29 19:28:55 +02:00
|
|
|
'docopt >= 0.6.1, < 0.7',
|
|
|
|
'PyYAML >= 3.10, < 4',
|
2016-10-12 02:56:02 +02:00
|
|
|
'requests >= 2.6.1, != 2.11.0, < 2.12',
|
2014-07-29 19:28:55 +02:00
|
|
|
'texttable >= 0.8.1, < 0.9',
|
2015-07-21 11:53:44 +02:00
|
|
|
'websocket-client >= 0.32.0, < 1.0',
|
2017-02-17 02:05:09 +01:00
|
|
|
'docker >= 2.1.0, < 3.0',
|
2016-02-04 17:01:11 +01:00
|
|
|
'dockerpty >= 0.4.1, < 0.5',
|
2014-07-30 22:11:11 +02:00
|
|
|
'six >= 1.3.0, < 2',
|
2015-07-27 16:15:07 +02:00
|
|
|
'jsonschema >= 2.5.1, < 3',
|
2014-07-29 19:28:55 +02:00
|
|
|
]
|
|
|
|
|
2015-03-26 04:13:01 +01:00
|
|
|
|
2014-07-30 22:11:11 +02:00
|
|
|
tests_require = [
|
2015-09-01 22:24:07 +02:00
|
|
|
'pytest',
|
2014-07-30 22:11:11 +02:00
|
|
|
]
|
|
|
|
|
|
|
|
|
2015-09-02 17:07:59 +02:00
|
|
|
if sys.version_info[:2] < (3, 4):
|
2014-08-19 23:36:46 +02:00
|
|
|
tests_require.append('mock >= 1.0.1')
|
2016-11-22 12:09:56 +01:00
|
|
|
|
|
|
|
extras_require = {
|
2017-01-10 23:57:32 +01:00
|
|
|
':python_version < "3.4"': ['enum34 >= 1.0.4, < 2'],
|
|
|
|
':python_version < "3.5"': ['backports.ssl_match_hostname >= 3.5'],
|
|
|
|
':python_version < "3.3"': ['ipaddress >= 1.0.16'],
|
2016-11-22 12:09:56 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
try:
|
|
|
|
if 'bdist_wheel' not in sys.argv:
|
|
|
|
for key, value in extras_require.items():
|
|
|
|
if key.startswith(':') and pkg_resources.evaluate_marker(key[1:]):
|
|
|
|
install_requires.extend(value)
|
2017-02-10 23:05:33 +01:00
|
|
|
except Exception as e:
|
|
|
|
print("Failed to compute platform dependencies: {}. ".format(e) +
|
|
|
|
"All dependencies will be installed as a result.", file=sys.stderr)
|
2016-11-22 12:09:56 +01:00
|
|
|
for key, value in extras_require.items():
|
|
|
|
if key.startswith(':'):
|
|
|
|
install_requires.extend(value)
|
2014-01-06 16:09:56 +01:00
|
|
|
|
2013-12-09 12:41:05 +01:00
|
|
|
|
|
|
|
setup(
|
2015-01-20 12:27:10 +01:00
|
|
|
name='docker-compose',
|
2015-01-12 15:59:05 +01:00
|
|
|
version=find_version("compose", "__init__.py"),
|
|
|
|
description='Multi-container orchestration for Docker',
|
|
|
|
url='https://www.docker.com/',
|
2014-07-24 19:24:02 +02:00
|
|
|
author='Docker, Inc.',
|
2014-05-28 11:59:21 +02:00
|
|
|
license='Apache License 2.0',
|
2015-03-26 04:13:01 +01:00
|
|
|
packages=find_packages(exclude=['tests.*', 'tests']),
|
2013-12-09 12:41:05 +01:00
|
|
|
include_package_data=True,
|
2014-01-06 03:26:32 +01:00
|
|
|
test_suite='nose.collector',
|
2014-01-06 16:09:56 +01:00
|
|
|
install_requires=install_requires,
|
2016-11-22 12:09:56 +01:00
|
|
|
extras_require=extras_require,
|
2014-01-06 16:09:56 +01:00
|
|
|
tests_require=tests_require,
|
2013-12-09 12:41:05 +01:00
|
|
|
entry_points="""
|
|
|
|
[console_scripts]
|
2015-01-20 12:27:10 +01:00
|
|
|
docker-compose=compose.cli.main:main
|
2013-12-09 12:41:05 +01:00
|
|
|
""",
|
2015-10-19 10:43:30 +02:00
|
|
|
classifiers=[
|
2015-10-26 18:08:45 +01:00
|
|
|
'Development Status :: 5 - Production/Stable',
|
|
|
|
'Environment :: Console',
|
|
|
|
'Intended Audience :: Developers',
|
|
|
|
'License :: OSI Approved :: Apache Software License',
|
|
|
|
'Programming Language :: Python :: 2',
|
2015-10-19 10:43:30 +02:00
|
|
|
'Programming Language :: Python :: 2.7',
|
2015-10-26 18:08:45 +01:00
|
|
|
'Programming Language :: Python :: 3',
|
2015-10-19 10:43:30 +02:00
|
|
|
'Programming Language :: Python :: 3.4',
|
|
|
|
],
|
2013-12-09 12:41:05 +01:00
|
|
|
)
|