9 import fake_py2deb as py2deb
14 __appname__ = constants.__app_name__
15 __description__ = "A Touch Screen Optimized RPN Calculator using Pie Menus"
16 __author__ = "Ed Page"
17 __email__ = "eopage@byu.net"
18 __version__ = constants.__version__
26 * Swapping the keyboard positions, seem more friendly to my thumb location this way
29 * Added +/-, !, sq, and sqrt functions
30 * Improved Documentation
31 * Copy of calculation result and the corresponding equation
35 * Experimenting with faster startup by including pyc files in package
36 * Minor tweaks and bug fixes
38 0.9.1 - "Laziness doesn't always pay off"
39 * Profiled the code with an especial focus on the pie menus
40 * Tried to reduce potential bugs with double clicks
41 * Fixed a visual artifact issue on popup
43 0.9.0 - "Feed is for horses, so what about feedback?"
44 * Initial public release
47 * Supports different number types and bases
52 __postinstall__ = '''#!/bin/sh -e
54 gtk-update-icon-cache -f /usr/share/icons/hicolor
59 for root, dirs, files in os.walk(path):
61 if file.startswith("src-"):
62 fileParts = file.split("-")
63 unused, relPathParts, newName = fileParts[0], fileParts[1:-1], fileParts[-1]
64 assert unused == "src"
65 relPath = os.sep.join(relPathParts)
66 yield relPath, file, newName
69 def unflatten_files(files):
71 for relPath, oldName, newName in files:
74 d[relPath].append((oldName, newName))
78 def build_package(distribution):
80 os.chdir(os.path.dirname(sys.argv[0]))
84 p = py2deb.Py2deb(__appname__)
85 p.description = __description__
90 "diablo": "python2.5, python2.5-gtk2",
91 "mer": "python2.6, python-gtk2, python-glade2",
93 p.section = "user/accessories"
96 p.distribution = "chinook diablo fremantle mer"
97 p.repository = "extras"
98 p.changelog = __changelog__
99 p.postinstall = __postinstall__
100 p.icon = "26x26-ejpi.png"
101 p["/usr/bin"] = [ "ejpi.py" ]
102 for relPath, files in unflatten_files(find_files(".")).iteritems():
103 fullPath = "/usr/lib/ejpi"
105 fullPath += os.sep+relPath
107 "|".join((oldName, newName))
108 for (oldName, newName) in files
110 p["/usr/share/applications/hildon"] = ["ejpi.desktop"]
111 p["/usr/share/icons/hicolor/26x26/hildon"] = ["26x26-ejpi.png|ejpi.png"]
112 p["/usr/share/icons/hicolor/64x64/hildon"] = ["64x64-ejpi.png|ejpi.png"]
113 p["/usr/share/icons/hicolor/scalable/hildon"] = ["scale-ejpi.png|ejpi.png"]
117 __version__, __build__, changelog=__changelog__,
118 tar=True, dsc=True, changes=True, build=False, src=True
120 print "Building for %s finished" % distribution
123 if __name__ == "__main__":
124 if len(sys.argv) > 1:
130 if optparse is not None:
131 parser = optparse.OptionParser()
132 (commandOptions, commandArgs) = parser.parse_args()
135 commandArgs = ["diablo"]
136 build_package(commandArgs[0])