compose/setup.py

43 lines
1.1 KiB
Python
Raw Normal View History

2013-12-09 12:41:05 +01:00
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup
import re
import os
import codecs
# Borrowed from
# https://github.com/jezdez/django_compressor/blob/develop/setup.py
def read(*parts):
return codecs.open(os.path.join(os.path.dirname(__file__), *parts)).read()
def find_version(*file_paths):
version_file = read(*file_paths)
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]",
version_file, re.M)
if version_match:
return version_match.group(1)
raise RuntimeError("Unable to find version string.")
2013-12-20 22:25:19 +01:00
with open('requirements.txt') as f:
install_requires = f.read().splitlines()
2013-12-09 12:41:05 +01:00
setup(
2013-12-20 21:28:24 +01:00
name='fig',
version=find_version("fig", "__init__.py"),
2013-12-09 12:41:05 +01:00
description='',
2013-12-20 21:28:24 +01:00
url='https://github.com/orchardup/fig',
2013-12-09 12:41:05 +01:00
author='Orchard Laboratories Ltd.',
author_email='hello@orchardup.com',
2013-12-20 21:28:24 +01:00
packages=['fig'],
2013-12-09 12:41:05 +01:00
package_data={},
include_package_data=True,
2013-12-20 22:25:19 +01:00
install_requires=install_requires,
2013-12-09 12:41:05 +01:00
entry_points="""
[console_scripts]
2013-12-20 21:28:24 +01:00
fig=fig.cli.main:main
2013-12-09 12:41:05 +01:00
""",
)