setup.py 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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.7',
  26. 'texttable >= 0.8.1, < 0.9',
  27. 'websocket-client >= 0.32.0, < 1.0',
  28. 'docker-py >= 1.3.1, < 1.4',
  29. 'dockerpty >= 0.3.4, < 0.4',
  30. 'six >= 1.3.0, < 2',
  31. 'jsonschema >= 2.5.1, < 3',
  32. ]
  33. tests_require = [
  34. 'mock >= 1.0.1',
  35. 'nose',
  36. 'pyinstaller',
  37. 'flake8',
  38. ]
  39. if sys.version_info < (2, 6):
  40. tests_require.append('unittest2')
  41. if sys.version_info[:1] < (3,):
  42. tests_require.append('pyinstaller')
  43. tests_require.append('mock >= 1.0.1')
  44. setup(
  45. name='docker-compose',
  46. version=find_version("compose", "__init__.py"),
  47. description='Multi-container orchestration for Docker',
  48. url='https://www.docker.com/',
  49. author='Docker, Inc.',
  50. license='Apache License 2.0',
  51. packages=find_packages(exclude=['tests.*', 'tests']),
  52. include_package_data=True,
  53. test_suite='nose.collector',
  54. install_requires=install_requires,
  55. tests_require=tests_require,
  56. entry_points="""
  57. [console_scripts]
  58. docker-compose=compose.cli.main:main
  59. """,
  60. )