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

# PySms - A text messenger for various swiss providers
# Copyright (C) 2007 Andreas Maechler <amaechler@gmx.ch>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Library General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

import glob
import os
from distutils.core import setup

# read the version from the pysms main program
pysms_version = os.popen( "cat bin/pysms |grep ^__version__.*=|cut -d\\\" -f2").read().strip()

# files to install
inst_images   = [ 'data/pysms_logo.png' ]
inst_icons    = [ 'data/pysms_icon.png' ]
inst_share    = [ 'data/pysms.glade' ]
inst_menu     = [ 'data/pysms.desktop' ]

data_files = [
  ('share/pysms/images',   inst_images),
  ('share/pysms',          inst_share),
  ('share/applications',   inst_menu),
  ('share/pixmaps',        inst_icons),
]

setup(
        name             = 'pysms',
        version          = pysms_version,
        description      = 'A simple tool for sending text messages.',
        author           = 'Andreas Maechler',
        author_email     = 'amaechler@gmx.ch',
        url              = 'http://people.ee.ethz.ch/~maandrea/',
        license          = 'GPL',

        package_dir      = { '': 'src' },
        packages         = [ 'pysms' ],

        scripts          = [ 'bin/pysms' ],
        data_files       = data_files
     )
     
     
