Bump to 1.3.7-0
[gc-dialer] / setup.py
1 #!/usr/bin/env python
2 # -*- coding: utf-8 -*-
3
4 import sys
5 reload(sys).setdefaultencoding("UTF-8")
6 import os
7
8 try:
9         from sdist_maemo import sdist_maemo as _sdist_maemo
10         sdist_maemo = _sdist_maemo
11 except ImportError:
12         sdist_maemo = None
13         print 'sdist_maemo command not available'
14
15 from distutils.core import setup
16
17
18 #[[[cog
19 #       import cog
20 #       from dialcentral import constants
21 #       cog.outl('APP_NAME="%s"' % constants.__app_name__)
22 #       cog.outl('PRETTY_APP_NAME="%s"' % constants.__pretty_app_name__)
23 #       cog.outl('VERSION="%s"' % constants.__version__)
24 #       cog.outl('BUILD="%s"' % constants.__build__)
25 #       cog.outl('DESKTOP_FILE_PATH="%s"' % DESKTOP_FILE_PATH)
26 #       cog.outl('INPUT_DESKTOP_FILE="%s"' % INPUT_DESKTOP_FILE)
27 #       cog.outl('ICON_CATEGORY="%s"' % ICON_CATEGORY)
28 #       cog.outl('ICON_SIZES=[%s]' % ICON_SIZES)
29 #]]]
30 APP_NAME="dialcentral"
31 PRETTY_APP_NAME="DialCentral"
32 VERSION="1.3.6"
33 BUILD="0"
34 DESKTOP_FILE_PATH="/usr/share/applications"
35 INPUT_DESKTOP_FILE="data/ubuntu/dialcentral.desktop"
36 ICON_CATEGORY="apps"
37 ICON_SIZES=[32,48]
38 #[[[end]]] (checksum: 6b362845c8509854ec12f330afd9c7b7)
39
40 CHANGES = """* PySide seems to handle signal connections differently, fixing my slots
41 """.strip()
42 BUGTRACKER_URL = "https://bugs.maemo.org/enter_bug.cgi?product=Dialcentral"
43
44
45 def is_package(path):
46         return (
47                 os.path.isdir(path) and
48                 os.path.isfile(os.path.join(path, '__init__.py'))
49         )
50
51
52 def find_packages(path, base="", includeRoot=False):
53         """ Find all packages in path """
54         if includeRoot:
55                 assert not base, "Base not supported with includeRoot: %r" % base
56                 rootPath, module_name = os.path.split(path)
57                 yield module_name
58                 base = module_name
59         for item in os.listdir(path):
60                 dir = os.path.join(path, item)
61                 if is_package( dir ):
62                         if base:
63                                 module_name = "%(base)s.%(item)s" % vars()
64                         else:
65                                 module_name = item
66                         yield module_name
67                         for mname in find_packages(dir, module_name):
68                                 yield mname
69
70
71 setup(
72         name=APP_NAME,
73         version=VERSION,
74         description="Touch screen enhanced interface to the GoogleVoice phone service",
75         long_description="Touch screen enhanced interface to the GoogleVoice phone service",
76         author="Ed Page",
77         author_email="eopage@byu.net",
78         maintainer="Ed Page",
79         maintainer_email="eopage@byu.net",
80         url="http://wiki.maemo.org/DialCentral",
81         license="GNU LGPLv2.1",
82         scripts=[
83                 "DialCentral",
84         ],
85         packages=list(find_packages(APP_NAME, includeRoot=True)),
86         package_data={
87                 "dialcentral": ["data/*.wav", "data/*.png"],
88         },
89         data_files=[
90                 (DESKTOP_FILE_PATH, [INPUT_DESKTOP_FILE]),
91                 ("/usr/share/icons/hicolor/scalable/apps", ["data/%s.svg" % APP_NAME]),
92         ] +
93         [
94                 (
95                         "/usr/share/icons/hicolor/%sx%s/%s" % (size, size, ICON_CATEGORY),
96                         ["data/icons/%s/%s.png" % (size, APP_NAME)]
97                 )
98                 for size in ICON_SIZES
99         ],
100         requires=[
101                 "PySide",
102                 "xml",
103         ],
104         cmdclass={
105                 'sdist_ubuntu': sdist_maemo,
106                 'sdist_diablo': sdist_maemo,
107                 'sdist_fremantle': sdist_maemo,
108                 'sdist_harmattan': sdist_maemo,
109         },
110         options={
111                 "sdist_ubuntu": {
112                         "debian_package": APP_NAME,
113                         "section": "comm",
114                         "copyright": "lgpl",
115                         "changelog": CHANGES,
116                         "buildversion": str(BUILD),
117                         "depends": "python, python-pyside.qtcore, python-pyside.qtgui, python-xdg, python-dbus, python-gst0.10",
118                         "architecture": "any",
119                 },
120                 "sdist_diablo": {
121                         "debian_package": APP_NAME,
122                         "Maemo_Display_Name": PRETTY_APP_NAME,
123                         #"Maemo_Upgrade_Description": CHANGES,
124                         "Maemo_Bugtracker": BUGTRACKER_URL,
125                         "Maemo_Icon_26": "data/icons/26/%s.png" % APP_NAME,
126                         "section": "user/network",
127                         "copyright": "lgpl",
128                         "changelog": CHANGES,
129                         "buildversion": str(BUILD),
130                         "depends": "python2.5, python2.5-qt4-core, python2.5-qt4-gui, python-xdg, python-simplejson, python-xml | python2.5-xml, python-dbus | python2.5-dbus",
131                         "architecture": "any",
132                 },
133                 "sdist_fremantle": {
134                         "debian_package": APP_NAME,
135                         "Maemo_Display_Name": PRETTY_APP_NAME,
136                         #"Maemo_Upgrade_Description": CHANGES,
137                         "Maemo_Bugtracker": BUGTRACKER_URL,
138                         "Maemo_Icon_26": "data/icons/48/%s.png" % APP_NAME,
139                         "section": "user/network",
140                         "copyright": "lgpl",
141                         "changelog": CHANGES,
142                         "buildversion": str(BUILD),
143                         "depends": "python, python-pyside.qtcore, python-pyside.qtgui, python-pyside.qtmaemo5, python-xdg, python-simplejson, python-gst0.10, python-xml | python2.5-xml, python-dbus | python2.5-dbus",
144                         "architecture": "any",
145                 },
146                 "sdist_harmattan": {
147                         "debian_package": APP_NAME,
148                         "Maemo_Display_Name": PRETTY_APP_NAME,
149                         #"Maemo_Upgrade_Description": CHANGES,
150                         "Maemo_Bugtracker": BUGTRACKER_URL,
151                         "Maemo_Icon_26": "data/icons/48/%s.png" % APP_NAME,
152                         "MeeGo_Desktop_Entry_Filename": APP_NAME,
153                         #"MeeGo_Desktop_Entry": "",
154                         "section": "user/science",
155                         "copyright": "lgpl",
156                         "changelog": CHANGES,
157                         "buildversion": str(BUILD),
158                         "depends": "python, python-pyside.qtcore, python-pyside.qtgui, python-xdg",
159                         "architecture": "any",
160                 },
161                 "bdist_rpm": {
162                         "requires": "REPLACEME",
163                         "icon": "data/icons/48/%s.png" % APP_NAME,
164                         "group": "REPLACEME",
165                 },
166         },
167 )