#!/usr/bin/env python
"""Kegbot kegerator controller software

This package contains Kegbot core controller and Django
frontend package.

Kegbot is a hardware and software system to record and monitor access to a beer
kegerator.  For more information and documentation, see http://kegbot.org/
"""

DOCLINES = __doc__.split('\n')

# Change this to True to include optional dependencies
USE_OPTIONAL = False

VERSION = '0.9.6'
SHORT_DESCRIPTION = DOCLINES[0]
LONG_DESCRIPTION = '\n'.join(DOCLINES[2:])
REQUIRED = [
  'kegbot-pyutils >= 0.1.4',
  'kegbot-api >= 0.1.2',

  'django >= 1.3',
  'django-autoslug',
  'django-imagekit >= 2.0',
  'django-registration',
  'django-socialregistration >= 0.5.4',
  'django_extensions',

  'MySQL-python',
  'South >= 0.7.3',
  'django-crispy-forms',
  'django-icanhaz',
  'django_nose',
  'facebook-sdk >= 0.3.0',
  'foursquare',
  'gunicorn >= 0.16.1',
  'pillow',
  'poster', # needed by foursquare
  'protobuf >= 2.4.1',
  'pylcdui >= 0.5.5',
  'pysqlite>=2.0.3',
  'python-gflags >= 1.8',
  'pytz',
  'requests', # needed by oauth
  'tweepy',
]

OPTIONAL = [
  ### Optional modules.
  # This modules 'pip install'd manually.  If you add to this list, also
  # update pykeg.core.optional_modules with a new 'HAVE_<MODULE>' flag, as
  # well as pykeg.settings (if needed).

  ### django-debug-toolbar
  'django-debug-toolbar',

  ### Celery
  'Celery',
  'django-celery',
  'django-kombu',

  ### Raven
  'raven',

  ### Sentry
  'sentry',
]

DEPENDENCIES = REQUIRED
if USE_OPTIONAL:
  DEPENDENCIES += OPTIONAL


def setup_package():
  from distribute_setup import use_setuptools
  use_setuptools()
  from setuptools import setup, find_packages

  setup(
      name = 'kegbot',
      version = VERSION,
      description = SHORT_DESCRIPTION,
      long_description = LONG_DESCRIPTION,
      author = 'mike wakerly',
      author_email = 'opensource@hoho.com',
      url = 'http://kegbot.org/',
      packages = find_packages('src'),
      package_dir = {
        '' : 'src',
      },
      scripts = [
        'distribute_setup.py',
        'bin/kegbot-admin.py',
      ],
      install_requires = DEPENDENCIES,
      dependency_links = [
          'https://github.com/rem/python-protobuf/tarball/master#egg=protobuf-2.4.1',
      ],
      include_package_data = True,
      entry_points = {
        'console_scripts': ['instance=django.core.management:execute_manager'],
      },

  )

if __name__ == '__main__':
  setup_package()

@@ -327,85 +327,8 @@
 ')%0A%0A
-# Change this to True to include optional dependencies%0AUSE_OPTIONAL = False%0A%0A
 VERS
@@ -416,24 +416,28 @@
 ES%5B2:%5D)%0A
-REQUIRED
+DEPENDENCIES
  = %5B%0A  '
@@ -652,23 +652,55 @@
 %0A  '
-MySQL-python
+Celery',%0A  'django-celery',%0A  'django-kombu
 ',%0A
+%0A
   'S
@@ -848,20 +848,8 @@
 1',%0A
-  'pillow',%0A
   'p
@@ -928,29 +928,8 @@
 5',%0A
-  'pysqlite%3E=2.0.3',%0A
   'p
@@ -1011,473 +1011,8 @@
 %0A%5D%0A%0A
-OPTIONAL = %5B%0A  ### Optional modules.%0A  # This modules 'pip install'd manually.  If you add to this list, also%0A  # update pykeg.core.optional_modules with a new 'HAVE_%3CMODULE%3E' flag, as%0A  # well as pykeg.settings (if needed).%0A%0A  ### django-debug-toolbar%0A  'django-debug-toolbar',%0A%0A  ### Celery%0A  'Celery',%0A  'django-celery',%0A  'django-kombu',%0A%0A  ### Raven%0A  'raven',%0A%0A  ### Sentry%0A  'sentry',%0A%5D%0A%0ADEPENDENCIES = REQUIRED%0Aif USE_OPTIONAL:%0A  DEPENDENCIES += OPTIONAL%0A%0A%0A
 def 
@@ -1866,16 +1866,16 @@
 ager'%5D,%0A
+
       %7D,
@@ -1875,17 +1875,16 @@
      %7D,%0A
-%0A
   )%0A%0Aif 

make celery required; remove sqlite, mysql, and pil from explicit deps.