from setuptools import setup, find_packages
import os, glob
import distutils.command.bdist_wininst
from distutils.command.bdist_wininst import bdist_wininst

longdesc = '''lechat, Libre-Entreprise Common Hypervisor and Administration Tool.'''

try:
    import py2exe
except:
    print 'Error loading py2exe for Windows.'

class my_bdist_wininst(bdist_wininst):
    def initialize_options(self):
        bdist_wininst.initialize_options(self)
        self.title = 'LECHAT-0.1'
        #self.bitmap = 'setup_wininst.bmp'
        #self.install_script = 'lechat-postinstall.py'
        
distutils.command.bdist_wininst.bdist_wininst = my_bdist_wininst

setup(
    name = "lechat",
    version = "0.2",
    description = "Libre-Entreprise Common Hypervisor and Administration Tool",
    author = "guillaume pernot",
    author_email = "gpernot@praksys.org",
    packages=['lechat', 'lechat-client', 'lechat-server' ],
    download_url = 'http://tranquilinux.org',
    license = 'GPLv3',
    platforms = 'Posix; MacOS X; Windows',
    classifiers = [ 'Development Status :: 4 - Beta',
                    'Intended Audience :: System Administrators',
                    'Intended Audience :: Information Technology',
                    'License :: OSI Approved :: GNU General Public License (GPL)',
                    'Operating System :: All POSIX (Linux/BSD/UNIX-like OSes)',
                    'Operating System :: Linux',
                    'Operating System :: 32-bit MS Windows (NT/2000/XP)',
                    'Topic :: System :: Systems Administration',
                    'Topic :: Networking :: Monitoring' ],
    long_description = longdesc,
    #py_modules = ['config'],
    package_data={'lechat-client': ['lechat-client/locale/fr/LC_MESSAGES/*.mo', 'config.py'] },
    data_files = [('lechat-client/locale/fr/LC_MESSAGES', ['lechat-client/locale/fr/LC_MESSAGES/lechat.mo']),
                  ('lechat-client/resources', glob.glob(os.path.join('lechat-client','resources','*.png'))),
                  ('lechat/lib', glob.glob(os.path.join('lechat','lib','*.pl')))],
    windows=[{'script': 'lechat-client/lechat-client.py',
              'icon_resources': [(1, 'doc/lechat.ico')] }],
    options={'py2exe':{'includes':['sip', 'PyQt4._qt']}}
    )


