setup.py 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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.2.1, < 3',
  25. 'texttable >= 0.8.1, < 0.9',
  26. 'websocket-client >= 0.11.0, < 0.12',
  27. 'docker-py >= 0.5, < 0.6',
  28. 'six >= 1.3.0, < 2',
  29. ]
  30. tests_require = [
  31. 'mock >= 1.0.1',
  32. 'nose',
  33. 'pyinstaller',
  34. 'flake8',
  35. ]
  36. if sys.version_info < (2, 7):
  37. tests_require.append('unittest2')
  38. setup(
  39. name='fig',
  40. version=find_version("fig", "__init__.py"),
  41. description='Fast, isolated development environments using Docker',
  42. url='http://www.fig.sh/',
  43. author='Docker, Inc.',
  44. license='Apache License 2.0',
  45. packages=find_packages(exclude=[ 'tests.*', 'tests' ]),
  46. include_package_data=True,
  47. test_suite='nose.collector',
  48. install_requires=install_requires,
  49. tests_require=tests_require,
  50. entry_points="""
  51. [console_scripts]
  52. fig=fig.cli.main:main
  53. """,
  54. )