#!/usr/bin/env python
# -*- coding: utf8 -*-

from distutils.core import setup
import sys
if sys.platform == 'win32':
    import py2exe
import glob
import os

from config import *

files = glob.glob('*.py')
modules = [module[:-3] for module in files]

setup(
    name = NAME,
    version = VERSION,
    description = DESCRIPTION,
    author = AUTHOR,
    author_email = AUTHOR_EMAIL,
    license = LICENSE,

    windows = [
                    {
                        'script': 'main.py'
                    }
              ],

    scripts = [
                    'main.py'
              ],

    py_modules = modules,

    options = {
                  'py2exe': {
                      'packages': 'encodings, Numeric, BitVector',
                      'includes': 'os, cairo, pango, pangocairo, atk,' \
                              + 'gobject',
                  }
              },

    data_files=[
                    ('share/pyconverter', ['pyconverter.glade']),
                    ('share/doc/pyconverter-' + VERSION, ['COPYING']),
                    ('share/pyconverter/help', glob.glob('help/*.html')),
                    ('share/pyconverter/help', [os.path.join('help', 'style.css')]),
                    ('share/pyconverter/help/figures', glob.glob('help/figures/*.png')),
                    ('share/pyconverter/help/images', glob.glob('help/images/*.png')),
                    ('share/pyconverter/test_files', glob.glob('test files/*.*')),
               ]
)
