setup.py 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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. setup(
  21. name='fig',
  22. version=find_version("fig", "__init__.py"),
  23. description='Punctual, lightweight development environments using Docker',
  24. url='https://github.com/orchardup/fig',
  25. author='Orchard Laboratories Ltd.',
  26. author_email='[email protected]',
  27. packages=find_packages(),
  28. include_package_data=True,
  29. test_suite='nose.collector',
  30. install_requires=[
  31. 'docker-py==0.2.3',
  32. 'docopt==0.6.1',
  33. 'PyYAML==3.10',
  34. # unfortunately `docker` requires six ==1.3.0
  35. 'six==1.3.0',
  36. ],
  37. tests_require=[
  38. 'nose==1.3.0',
  39. 'unittest2==0.5.1'
  40. ],
  41. entry_points="""
  42. [console_scripts]
  43. fig=fig.cli.main:main
  44. """,
  45. )