setup.py 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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 re
  7. import os
  8. import codecs
  9. def read(*parts):
  10. path = os.path.join(os.path.dirname(__file__), *parts)
  11. with codecs.open(path, encoding='utf-8') as fobj:
  12. return fobj.read()
  13. def find_version(*file_paths):
  14. version_file = read(*file_paths)
  15. version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]",
  16. version_file, re.M)
  17. if version_match:
  18. return version_match.group(1)
  19. raise RuntimeError("Unable to find version string.")
  20. install_requires = [
  21. 'docopt >= 0.6.1, < 0.7',
  22. 'PyYAML >= 3.10, < 4',
  23. 'requests >= 2.2.1, < 3',
  24. 'texttable >= 0.8.1, < 0.9',
  25. 'websocket-client >= 0.11.0, < 0.12',
  26. 'dockerpty >= 0.2.3, < 0.3',
  27. ]
  28. with open('requirements-dev.txt') as f:
  29. tests_require = f.read().splitlines()
  30. setup(
  31. name='fig',
  32. version=find_version("fig", "__init__.py"),
  33. description='Punctual, lightweight development environments using Docker',
  34. url='http://www.fig.sh/',
  35. author='Docker, Inc.',
  36. license='Apache License 2.0',
  37. packages=find_packages(),
  38. include_package_data=True,
  39. test_suite='nose.collector',
  40. install_requires=install_requires,
  41. tests_require=tests_require,
  42. entry_points="""
  43. [console_scripts]
  44. fig=fig.cli.main:main
  45. """,
  46. )