setup.py 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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. 'cached-property >= 1.2.0, < 2',
  24. 'docopt >= 0.6.1, < 0.7',
  25. 'PyYAML >= 3.10, < 4',
  26. 'requests >= 2.6.1, < 2.8',
  27. 'texttable >= 0.8.1, < 0.9',
  28. 'websocket-client >= 0.32.0, < 1.0',
  29. 'docker-py > 1.7.2, < 2',
  30. 'dockerpty >= 0.4.1, < 0.5',
  31. 'six >= 1.3.0, < 2',
  32. 'jsonschema >= 2.5.1, < 3',
  33. ]
  34. tests_require = [
  35. 'pytest',
  36. ]
  37. if sys.version_info[:2] < (3, 4):
  38. tests_require.append('mock >= 1.0.1')
  39. install_requires.append('enum34 >= 1.0.4, < 2')
  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. classifiers=[
  57. 'Development Status :: 5 - Production/Stable',
  58. 'Environment :: Console',
  59. 'Intended Audience :: Developers',
  60. 'License :: OSI Approved :: Apache Software License',
  61. 'Programming Language :: Python :: 2',
  62. 'Programming Language :: Python :: 2.7',
  63. 'Programming Language :: Python :: 3',
  64. 'Programming Language :: Python :: 3.4',
  65. ],
  66. )