# distutils based setup script
# for making tarballs to ease distribution

import sys
from distutils.core import setup

try:
    import pygtk
    pygtk.require('2.0')
except ImportError:
    print >>sys.stderr, "Can't import pygtk"
    sys.exit(1)

try:
    import pygtk
    pygtk.require('2.0')
    import gtk
except ImportError:
    print >>sys.stderr, "Can't import gtk"
    sys.exit(1)

try:
    import gtk.glade
except ImportError:
    print >>sys.stderr, "Can't import gtk.glade"
    sys.exit(1)
    
try:
    import gnomeapplet
except ImportError:
    print >>sys.stderr, "Can't import gnomeapplet"
    sys.exit(1)

    
# Patch distutils if it can't cope with the "classifiers" or
# "download_url" keywords.
if sys.version < '2.2.3':
    from distutils.dist import DistributionMetadata
    DistributionMetadata.classifiers = None
    DistributionMetadata.download_url = None

setup(name ='moosic-applet',
      version = '0.3.2',
      description = 'GNOME applet for controlling Moosic',
      author = 'Paramjit Oberoi and Daniel Pearson',
      author_email = 'param@cs.wisc.edu',
      url = 'http://www.nanoo.org/~daniel/moosic/',
      license = 'GPL',
      long_description = '''
Moosic Applet is a GNOME panel applet for controlling the Moosic
music player.  It displays information like song name, queue length,
queue status, and track time in the panel and allows performing simple
operations like starting/stopping/pausing the player, adding files,
enabling/disabling loop mode, etc., using buttons and menus. The
display can be configured to show different levels of detail.
'''.strip(),
      classifiers = [
        'Development Status :: 5 - Production/Stable',
        'Environment :: X11 Applications :: GTK',
        'Environment :: X11 Applications :: Gnome',
        'Intended Audience :: End Users/Desktop',
        'License :: OSI Approved :: GNU General Public License (GPL)',
        'Natural Language :: English',
        'Operating System :: POSIX',
        'Operating System :: Unix',
        'Programming Language :: Python',
        'Topic :: Multimedia :: Sound/Audio',
      ],
      scripts = ['scripts/moosic-applet'],
      package_dir = {'moosic.client.applet': 'applet'},
      packages = ['moosic.client.applet'],
      data_files = [
        ('share/moosic-applet', ['data/prefs-window.glade']),
        ('lib/bonobo/servers', ['data/GNOME_MoosicApplet.server']),
        ('share/doc/moosic-applet', ['README', 'INSTALL', 'License',
                                        'Changelog', 'TODO', 'USAGE']),
      ],
)

