from setuptools import setup, find_packages
import sys

# Kept manually in sync with airflow.__version__
version = '1.5.1'

doc = [
    'sphinx>=1.2.3',
    'sphinx-argparse>=0.1.13',
    'sphinx-rtd-theme>=0.1.6',
    'Sphinx-PyPI-upload>=0.2.1'
]
hive = [
    'hive-thrift-py>=0.0.1',
    'pyhive>=0.1.3',
    'pyhs2>=0.6.0',
]
mysql = ['mysql-python>=1.2.5']
postgres = ['psycopg2>=2.6']
optional = ['librabbitmq>=1.6.1']
samba = ['pysmbclient>=0.1.3']
druid = ['pydruid>=0.2.1']
s3 = ['boto>=2.36.0']
jdbc = ['jaydebeapi>=0.2.0']
mssql = ['pymssql>=2.1.1', 'unicodecsv>=0.13.0']
hdfs = ['snakebite>=2.4.13']
slack = ['slackclient>=0.15']
crypto = ['cryptography>=0.9.3']
oracle = ['cx_Oracle>=5.1.2']
vertica = ['vertica-python>=0.5.1']

all_dbs = postgres + mysql + hive + mssql + hdfs + vertica
devel = all_dbs + doc + samba + s3 + ['nose'] + slack + crypto + oracle

setup(
    name='airflow',
    description='Programmatically author, schedule and monitor data pipelines',
    version=version,
    packages=find_packages(),
    package_data={'': ['airflow/alembic.ini']},
    include_package_data=True,
    zip_safe=False,
    scripts=['airflow/bin/airflow'],
    install_requires=[
        'alembic>=0.8.0, <0.9',
        'celery>=3.1.17, <4.0',
        'chartkick>=0.4.2, < 0.5',
        'dill>=0.2.2, <0.3',
        'flask>=0.10.1, <0.11',
        'flask-admin==1.2.0',
        'flask-cache>=0.13.1, <0.14',
        'flask-login>=0.2.11, <0.3',
        'flower>=0.7.3, <0.8',
        'future>=0.15.0, <0.16',
        'gunicorn>=19.3.0, <20.0',
        'jinja2>=2.7.3, <3.0',
        'markdown>=2.5.2, <3.0',
        'pandas>=0.15.2, <1.0.0',
        'pygments>=2.0.1, <3.0',
        'python-dateutil>=2.3, <3',
        'requests>=2.5.1, <3',
        'setproctitle>=1.1.8, <2',
        'sqlalchemy>=0.9.8, <0.10',
        'statsd>=3.0.1, <4.0',
        'thrift>=0.9.2, <0.10',
    ],
    extras_require={
        'all': devel + optional,
        'all_dbs': all_dbs,
        'devel': devel,
        'doc': doc,
        'druid': druid,
        'hdfs': hdfs,
        'hive': hive,
        'jdbc': jdbc,
        'mssql': mssql,
        'mysql': mysql,
        'postgres': postgres,
        's3': s3,
        'samba': samba,
        'slack': slack,
        'crypto': crypto,
        'oracle': oracle,
        'vertica': vertica,
    },
    author='Maxime Beauchemin',
    author_email='maximebeauchemin@gmail.com',
    url='https://github.com/airbnb/airflow',
    download_url=(
        'https://github.com/airbnb/airflow/tarball/' + version),
)

@@ -117,16 +117,105 @@
 1.5.1'%0A%0A
+celery = %5B%0A    'celery%3E=3.1.17', %0A    'flower%3E=0.7.3'%0A%5D%0Acrypto = %5B'cryptography%3E=0.9.3'%5D%0A
 doc = %5B%0A
@@ -331,16 +331,72 @@
 .2.1'%0A%5D%0A
+druid = %5B'pydruid%3E=0.2.1'%5D%0Ahdfs = %5B'snakebite%3E=2.4.13'%5D%0A
 hive = %5B
@@ -468,16 +468,94 @@
 6.0',%0A%5D%0A
+jdbc = %5B'jaydebeapi%3E=0.2.0'%5D%0Amssql = %5B'pymssql%3E=2.1.1', 'unicodecsv%3E=0.13.0'%5D%0A
 mysql = 
@@ -582,37 +582,8 @@
 5'%5D%0A
-postgres = %5B'psycopg2%3E=2.6'%5D%0A
 opti
@@ -616,63 +616,64 @@
 1'%5D%0A
-samba = %5B'pysmbclient%3E=0.1.3'%5D%0Adruid = %5B'pydruid%3E=0.2.1
+oracle = %5B'cx_Oracle%3E=5.1.2'%5D%0Apostgres = %5B'psycopg2%3E=2.6
 '%5D%0As
@@ -697,205 +697,99 @@
 0'%5D%0A
-jdbc = %5B'jaydebeapi%3E=0.2.0'%5D%0Amssql = %5B'pymssql%3E=2.1.1', 'unicodecsv%3E=0.13.0'%5D%0Ahdfs = %5B'snakebite%3E=2.4.13'%5D%0Aslack = %5B'slackclient%3E=0.15'%5D%0Acrypto = %5B'cryptography%3E=0.9.3'%5D%0Aoracle = %5B'cx_Oracle%3E=5.1.2
+samba = %5B'pysmbclient%3E=0.1.3'%5D%0Aslack = %5B'slackclient%3E=0.15'%5D%0Astatsd = %5B'statsd%3E=3.0.1, %3C4.0
 '%5D%0Av
@@ -1309,40 +1309,8 @@
 9',%0A
-        'celery%3E=3.1.17, %3C4.0',%0A
     
@@ -1510,39 +1510,8 @@
 3',%0A
-        'flower%3E=0.7.3, %3C0.8',%0A
     
@@ -1847,39 +1847,8 @@
 0',%0A
-        'statsd%3E=3.0.1, %3C4.0',%0A
     
@@ -1964,16 +1964,68 @@
 ll_dbs,%0A
+        'celery': celery,%0A        'crypto': crypto,%0A
         
@@ -2194,24 +2194,50 @@
 ql': mysql,%0A
+        'oracle': oracle,%0A
         'pos
@@ -2333,49 +2333,23 @@
    '
-crypto': crypto,%0A        'oracle': oracle
+statsd': statsd
 ,%0A  

move celery/statsd to optional requirements; alphabetize reqs