# coding=utf-8
import io
import os
import re
from setuptools import setup, find_packages


def get_path(*args):
    return os.path.join(os.path.dirname(__file__), *args)


def read_from(filepath):
    with io.open(filepath, 'rt', encoding='utf8') as f:
        return f.read()


def get_requirements(filename='requirements.txt'):
    data = read_from(get_path(filename))
    lines = map(lambda s: s.strip(), data.splitlines())
    return [l for l in lines if l and not l.startswith('#')]


data = read_from(get_path('shake', '__init__.py')).encode('utf8')
version = str(re.search(b"__version__\s*=\s*u?'([^']+)'", data).group(1)).strip()
desc = str(re.search(b'"""(.+)"""', data, re.DOTALL).group(1)).strip()


setup(
    name='Shake',
    version=version,
    author='<NAME>',
    author_email='<EMAIL>',
    packages=find_packages(),
    include_package_data=True,
    zip_safe=False,
    url='http://github.com/lucuma/shake',
    license='MIT license (see LICENSE)',
    description='A lightweight web framework based on Werkzeug and Jinja2 as an alternative to Flask',
    long_description=desc,
    install_requires=get_requirements(),
    classifiers=[
        'Development Status :: 4 - Beta',
        'Environment :: Web Environment',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: MIT License',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 2.6',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.4',
        'Programming Language :: Python :: Implementation :: PyPy',
    ]
)

# coding=utf-8
import io
import os
import re
from setuptools import setup, find_packages


def get_path(*args):
    return os.path.join(os.path.dirname(__file__), *args)


def read_from(filepath):
    with io.open(filepath, 'rt', encoding='utf8') as f:
        return f.read()


def get_requirements(filename='requirements.txt'):
    data = read_from(get_path(filename))
    lines = map(lambda s: s.strip(), data.splitlines())
    return [l for l in lines if l and not l.startswith('#')]


data = read_from(get_path('shake', '__init__.py')).encode('utf8')
version = str(re.search(b"__version__\s*=\s*u?'([^']+)'", data).group(1)).strip()
desc = str(re.search(b'"""(.+)"""', data, re.DOTALL).group(1)).strip()


setup(
    name='Shake',
    version=version,
    author='<NAME>',
    author_email='<EMAIL>',
    packages=find_packages(),
    include_package_data=True,
    zip_safe=False,
    url='http://github.com/lucuma/shake',
    license='MIT license (see LICENSE)',
    description='A lightweight web framework based on Werkzeug and Jinja2 as an alternative to Flask',
    long_description=desc,
    install_requires=get_requirements(),
    classifiers=[
        'Development Status :: 4 - Beta',
        'Environment :: Web Environment',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: MIT License',
        'Programming Language :: Python :: 2',
        'Programming Language :: Python :: 2.6',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
        'Programming Language :: Python :: 3.4',
        'Programming Language :: Python :: Implementation :: PyPy',
    ]
)

# coding=utf-8 (.+)