setup.py 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. with open('requirements.txt') as f:
  21. install_requires = f.read().splitlines()
  22. with open('requirements-dev.txt') as f:
  23. tests_require = f.read().splitlines()
  24. setup(
  25. name='fig',
  26. version=find_version("fig", "__init__.py"),
  27. description='Punctual, lightweight development environments using Docker',
  28. url='http://www.fig.sh/',
  29. author='Docker, Inc.',
  30. license='Apache License 2.0',
  31. packages=find_packages(),
  32. include_package_data=True,
  33. test_suite='nose.collector',
  34. install_requires=install_requires,
  35. tests_require=tests_require,
  36. entry_points="""
  37. [console_scripts]
  38. fig=fig.cli.main:main
  39. """,
  40. )