setup.py 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. from setuptools import setup
  4. import re
  5. import os
  6. import codecs
  7. # Borrowed from
  8. # https://github.com/jezdez/django_compressor/blob/develop/setup.py
  9. def read(*parts):
  10. return codecs.open(os.path.join(os.path.dirname(__file__), *parts)).read()
  11. def find_version(*file_paths):
  12. version_file = read(*file_paths)
  13. version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]",
  14. version_file, re.M)
  15. if version_match:
  16. return version_match.group(1)
  17. raise RuntimeError("Unable to find version string.")
  18. with open('requirements.txt') as f:
  19. install_requires = f.read().splitlines()
  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=['fig', 'fig.cli'],
  28. package_data={},
  29. include_package_data=True,
  30. install_requires=install_requires,
  31. entry_points="""
  32. [console_scripts]
  33. fig=fig.cli.main:main
  34. """,
  35. )