1
0

setup.py 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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://orchardup.github.io/fig/',
  29. author='Orchard Laboratories Ltd.',
  30. author_email='[email protected]',
  31. license='BSD',
  32. packages=find_packages(),
  33. include_package_data=True,
  34. test_suite='nose.collector',
  35. install_requires=install_requires,
  36. tests_require=tests_require,
  37. entry_points="""
  38. [console_scripts]
  39. fig=fig.cli.main:main
  40. """,
  41. )