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)),
83 (DESKTOP_FILE_PATH, [INPUT_DESKTOP_FILE]),
84 ("/usr/share/icons/hicolor/22x22/apps", ["data/icons/22/%s.png" % APP_NAME]),
85 ("/usr/share/icons/hicolor/28x28/apps", ["data/icons/28/%s.png" % APP_NAME]),
86 ("/usr/share/icons/hicolor/32x32/apps", ["data/icons/32/%s.png" % APP_NAME]),
87 ("/usr/share/icons/hicolor/48x48/apps", ["data/icons/48/%s.png" % APP_NAME]),
88 ("/usr/share/icons/hicolor/80x80/apps", ["data/icons/80/%s.png" % APP_NAME]),
89 ("/usr/share/icons/hicolor/scalable/apps", ["data/%s.svg" % APP_NAME]),
95 'sdist_ubuntu': sdist_maemo,
96 'sdist_diablo': sdist_maemo,
97 'sdist_fremantle': sdist_maemo,
98 'sdist_harmattan': sdist_maemo,
102 "debian_package": APP_NAME,
105 "changelog": CHANGES,
106 "buildversion": str(BUILD),
107 "depends": "python, python-pyside.qtcore, python-pyside.qtgui",
108 "architecture": "any",
111 "debian_package": APP_NAME,
112 "Maemo_Display_Name": PRETTY_APP_NAME,
113 #"Maemo_Upgrade_Description": CHANGES,
114 "Maemo_Bugtracker": BUGTRACKER_URL,
115 "Maemo_Icon_26": "data/icons/26/%s.png" % APP_NAME,
116 "section": "user/science",
118 "changelog": CHANGES,
119 "buildversion": str(BUILD),
120 "depends": "python2.5, python2.5-qt4-core, python2.5-qt4-gui",
121 "architecture": "any",
124 "debian_package": APP_NAME,
125 "Maemo_Display_Name": PRETTY_APP_NAME,
126 #"Maemo_Upgrade_Description": CHANGES,
127 "Maemo_Bugtracker": BUGTRACKER_URL,
128 "Maemo_Icon_26": "data/icons/48/%s.png" % APP_NAME,
129 "section": "user/science",
131 "changelog": CHANGES,
132 "buildversion": str(BUILD),
133 "depends": "python, python-pyside.qtcore, python-pyside.qtgui, python-pyside.qtmaemo5",
134 "architecture": "any",
137 "debian_package": APP_NAME,
138 "Maemo_Display_Name": PRETTY_APP_NAME,
139 #"Maemo_Upgrade_Description": CHANGES,
140 "Maemo_Bugtracker": BUGTRACKER_URL,
141 "Maemo_Icon_26": "data/icons/48/%s.png" % APP_NAME,
142 "MeeGo_Desktop_Entry_Filename": APP_NAME,
143 #"MeeGo_Desktop_Entry": "",
144 "section": "user/science",
146 "changelog": CHANGES,
147 "buildversion": str(BUILD),
148 "depends": "python, python-pyside.qtcore, python-pyside.qtgui",
149 "architecture": "any",
152 "requires": "REPLACEME",
153 "icon": "data/icons/48/%s.png" % APP_NAME,
154 "group": "REPLACEME",