from __future__ import print_function
# https://coderwall.com/p/qawuyq
# Thanks James.

try:
    import pypandoc
    long_description = pypandoc.convert('README.md', 'rst')
except (IOError, ImportError):
    long_description = ''
    print('warning: pandoc or pypandoc does not seem to be installed; using empty long_description')

import os
requirements_file = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'requirements.txt')
with open(requirements_file, 'r') as f:
    install_requires = [x.strip() for x in f.readlines()]

import importlib
from setuptools import setup

setup(
    name='metabaiji-serialization',
    version=importlib.import_module('baiji.serialization').__version__,
    author='Body Labs',
    author_email='github@paulmelnikow.com',
    description='Read and write common file formats to Amazon S3 and local files',
    long_description=long_description,
    url='https://github.com/metabolize/baiji-serialization',
    license='Apache',
    packages=[
        'baiji',
        'baiji/serialization',
        'baiji/serialization/util',
    ],
    install_requires=install_requires,
    # See https://pypi.python.org/pypi?%3Aaction=list_classifiers
    classifiers=[
        'Development Status :: 3 - Alpha',
        'Intended Audience :: Developers',
        'License :: OSI Approved :: Apache Software License',
        'Operating System :: OS Independent',
        'Programming Language :: Python :: 2.7',
        'Programming Language :: Python :: 3',
    ]
)
