setup.py 1.6 KB

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