setup.py 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. from __future__ import absolute_import
  4. from __future__ import unicode_literals
  5. import codecs
  6. import os
  7. import re
  8. import sys
  9. from setuptools import find_packages
  10. from setuptools import setup
  11. def read(*parts):
  12. path = os.path.join(os.path.dirname(__file__), *parts)
  13. with codecs.open(path, encoding='utf-8') as fobj:
  14. return fobj.read()
  15. def find_version(*file_paths):
  16. version_file = read(*file_paths)
  17. version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]",
  18. version_file, re.M)
  19. if version_match:
  20. return version_match.group(1)
  21. raise RuntimeError("Unable to find version string.")
  22. install_requires = [
  23. 'docopt >= 0.6.1, < 0.7',
  24. 'PyYAML >= 3.10, < 4',
  25. 'requests >= 2.6.1, < 2.8',
  26. 'texttable >= 0.8.1, < 0.9',
  27. 'websocket-client >= 0.32.0, < 1.0',
  28. 'docker-py >= 1.4.0, < 2',
  29. 'dockerpty >= 0.3.4, < 0.4',
  30. 'six >= 1.3.0, < 2',
  31. 'jsonschema >= 2.5.1, < 3',
  32. ]
  33. tests_require = [
  34. 'pytest',
  35. ]
  36. if sys.version_info[:2] < (3, 4):
  37. tests_require.append('mock >= 1.0.1')
  38. install_requires.append('enum34 >= 1.0.4, < 2')
  39. setup(
  40. name='docker-compose',
  41. version=find_version("compose", "__init__.py"),
  42. description='Multi-container orchestration for Docker',
  43. url='https://www.docker.com/',
  44. author='Docker, Inc.',
  45. license='Apache License 2.0',
  46. packages=find_packages(exclude=['tests.*', 'tests']),
  47. include_package_data=True,
  48. test_suite='nose.collector',
  49. install_requires=install_requires,
  50. tests_require=tests_require,
  51. entry_points="""
  52. [console_scripts]
  53. docker-compose=compose.cli.main:main
  54. """,
  55. )