[wammu @ michal@cihar.com--2005-main/wammu--devel--1--patch-90]
[wammu.git] / setup.py
blob00e05468a3258f1446588560ecedd2b49749b72e
1 #!/usr/bin/env python
2 # -*- coding: UTF-8 -*-
4 # Wammu - Phone manager
5 # Copyright (c) 2003 - 2006 Michal Čihař
7 # This program is free software; you can redistribute it and/or modify it
8 # under the terms of the GNU General Public License version 2 as published by
9 # the Free Software Foundation.
11 # This program is distributed in the hope that it will be useful, but WITHOUT
12 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 # more details.
16 # You should have received a copy of the GNU General Public License along with
17 # this program; if not, write to the Free Software Foundation, Inc.,
18 # 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21 from distutils.core import setup
22 import sys
23 import glob
24 import Wammu
25 import os.path
26 import os
28 # detect whether we should check for dependencies
29 skip_deps = 'clean' in sys.argv or '--help' in sys.argv or '--help-commands' in sys.argv or 'sdist' in sys.argv
31 # somw defines
32 PYTHONGAMMU_REQUIRED = (0,10)
34 if not skip_deps:
35 if os.getenv('SKIPGAMMUCHECK') == 'yes':
36 print 'Skipping Gammu check, expecting you know what you are doing!'
37 else:
38 try:
39 import gammu
40 except ImportError:
41 print 'You need python-gammu!'
42 print 'You can get it from <http://cihar.com/gammu/python/>'
43 sys.exit(1)
44 pygver = tuple(map(int, gammu.Version()[1].split('.')))
45 if pygver < PYTHONGAMMU_REQUIRED:
46 print 'You need python-gammu at least %s!' % '.'.join(map(str, PYTHONGAMMU_REQUIRED))
47 print 'You can get it from <http://cihar.com/gammu/python/>'
48 sys.exit(1)
50 if os.getenv('SKIPWXCHECK') == 'yes':
51 print 'Skipping wx check, expecting you know what you are doing!'
52 else:
53 try:
54 import wx
55 except ImportError:
56 print 'You need wxPython!'
57 print 'You can get it from <http://www.wxpython.org>'
58 sys.exit(1)
59 if wx.VERSION < (2,4,1,2):
60 print 'You need at least wxPython 2.4.1.2!'
61 print 'You can get it from <http://www.wxpython.org>'
62 sys.exit(1)
64 try:
65 import gnomebt.controller
66 except ImportError:
67 try:
68 import bluetooth
69 except ImportError:
70 print 'WARNING: neither GNOME Bluetooth nor PyBluez found, without those you can not search for bluetooth devices'
71 print 'GNOME Bluetooth can be downloaded from <http://usefulinc.com/software/gnome-bluetooth>'
72 print 'PyBluez can be downloaded from <http://org.csail.mit.edu/pybluez/>'
74 setup(name="wammu",
75 version = Wammu.__version__,
76 description = "GUI for gammu.",
77 long_description = "Phone manager built on top of python-gammu. Supports many phones.",
78 author = "Michal Čihař",
79 author_email = "michal@cihar.com",
80 maintainer = "Michal Čihař",
81 maintainer_email = "michal@cihar.com",
82 url = "http://cihar.com/gammu/wammu",
83 license = "GPL",
84 classifiers = [
85 'Development Status :: 5 - Production/Stable',
86 'Environment :: Win32 (MS Windows)',
87 'Environment :: X11 Applications :: GTK',
88 'Intended Audience :: End Users/Desktop',
89 'License :: OSI Approved :: GNU General Public License (GPL)',
90 'Operating System :: Microsoft :: Windows :: Windows 95/98/ME',
91 'Operating System :: Microsoft :: Windows :: Windows NT/2000/XP',
92 'Operating System :: POSIX',
93 'Operating System :: Unix',
94 'Programming Language :: Python',
95 'Topic :: Communications :: Telephony',
96 'Topic :: Office/Business :: Scheduling',
97 'Topic :: Utilities',
98 'Translations :: English',
99 'Translations :: Czech'
102 packages = ['Wammu', 'Wammu.wxcomp'],
103 scripts = ['wammu'],
104 data_files = [
105 (os.path.join('share','Wammu','images','icons'), glob.glob('images/icons/*.png')),
106 (os.path.join('share','Wammu','images','misc'), glob.glob('images/misc/*.png')),
107 (os.path.join('share','locale','cs','LC_MESSAGES'), ['locale/cs/LC_MESSAGES/wammu.mo']),
108 (os.path.join('share','applications'), ['wammu.desktop']),
109 (os.path.join('share','pixmaps'), ['wammu.png', 'wammu.xpm']),
110 (os.path.join('share','man','man1'), ['wammu.1'])