2 # -*- coding: utf-8 -*-
5 reload(sys).setdefaultencoding("UTF-8")
9 from sdist_maemo import sdist_maemo as _sdist_maemo
10 sdist_maemo = _sdist_maemo
13 print 'sdist_maemo command not available'
15 from distutils.core import setup
20 # from ejpi 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)
29 PRETTY_APP_NAME="e**(j pi) + 1 = 0"
32 DESKTOP_FILE_PATH="/usr/share/applications"
33 INPUT_DESKTOP_FILE="data/harmattan/ejpi.desktop"
36 CHANGES = """Switching from py2deb.py to sdist_maemo
38 BUGTRACKER_URL = "https://bugs.maemo.org/enter_bug.cgi?product=ejpi"
43 os.path.isdir(path) and
44 os.path.isfile(os.path.join(path, '__init__.py'))
48 def find_packages(path, base="", includeRoot=False):
49 """ Find all packages in path """
51 assert not base, "Base not supported with includeRoot: %r" % base
52 rootPath, module_name = os.path.split(path)
55 for item in os.listdir(path):
56 dir = os.path.join(path, item)
59 module_name = "%(base)s.%(item)s" % vars()
63 for mname in find_packages(dir, module_name):
70 description="RPN calculator designed for touchscreens",
71 long_description="RPN calculator designed for touchscreens",
73 author_email="eopage@byu.net",
75 maintainer_email="eopage@byu.net",
76 url="http://ejpi.garage.maemo.org/",
77 license="GNU LGPLv2.1",
81 packages=list(find_packages(APP_NAME, includeRoot=True)),
86 (DESKTOP_FILE_PATH, [INPUT_DESKTOP_FILE]),
87 ("/usr/share/icons/hicolor/22x22/apps", ["data/icons/22/%s.png" % APP_NAME]),
88 ("/usr/share/icons/hicolor/28x28/apps", ["data/icons/28/%s.png" % APP_NAME]),
89 ("/usr/share/icons/hicolor/32x32/apps", ["data/icons/32/%s.png" % APP_NAME]),
90 ("/usr/share/icons/hicolor/48x48/apps", ["data/icons/48/%s.png" % APP_NAME]),
91 ("/usr/share/icons/hicolor/80x80/apps", ["data/icons/80/%s.png" % APP_NAME]),
92 ("/usr/share/icons/hicolor/scalable/apps", ["data/%s.svg" % APP_NAME]),
98 'sdist_ubuntu': sdist_maemo,
99 'sdist_diablo': sdist_maemo,
100 'sdist_fremantle': sdist_maemo,
101 'sdist_harmattan': sdist_maemo,
105 "debian_package": APP_NAME,
108 "changelog": CHANGES,
109 "buildversion": str(BUILD),
110 "depends": "python, python-pyside.qtcore, python-pyside.qtgui",
111 "architecture": "any",
114 "debian_package": APP_NAME,
115 "Maemo_Display_Name": PRETTY_APP_NAME,
116 #"Maemo_Upgrade_Description": CHANGES,
117 "Maemo_Bugtracker": BUGTRACKER_URL,
118 "Maemo_Icon_26": "data/icons/26/%s.png" % APP_NAME,
119 "section": "user/science",
121 "changelog": CHANGES,
122 "buildversion": str(BUILD),
123 "depends": "python2.5, python2.5-qt4-core, python2.5-qt4-gui",
124 "architecture": "any",
127 "debian_package": APP_NAME,
128 "Maemo_Display_Name": PRETTY_APP_NAME,
129 #"Maemo_Upgrade_Description": CHANGES,
130 "Maemo_Bugtracker": BUGTRACKER_URL,
131 "Maemo_Icon_26": "data/icons/48/%s.png" % APP_NAME,
132 "section": "user/science",
134 "changelog": CHANGES,
135 "buildversion": str(BUILD),
136 "depends": "python, python-pyside.qtcore, python-pyside.qtgui, python-pyside.qtmaemo5",
137 "architecture": "any",
140 "debian_package": APP_NAME,
141 "Maemo_Display_Name": PRETTY_APP_NAME,
142 #"Maemo_Upgrade_Description": CHANGES,
143 "Maemo_Bugtracker": BUGTRACKER_URL,
144 "Maemo_Icon_26": "data/icons/48/%s.png" % APP_NAME,
145 "MeeGo_Desktop_Entry_Filename": APP_NAME,
146 #"MeeGo_Desktop_Entry": "",
147 "section": "user/science",
149 "changelog": CHANGES,
150 "buildversion": str(BUILD),
151 "depends": "python, python-pyside.qtcore, python-pyside.qtgui",
152 "architecture": "any",
155 "requires": "REPLACEME",
156 "icon": "data/icons/48/%s.png" % APP_NAME,
157 "group": "REPLACEME",