Ticket #585: bb-freeze.darcs.2.patch

File bb-freeze.darcs.2.patch, 13.6 KB (added by davidsarah, at 2011-01-03T07:14:24Z)

Various hacks to get bb-freeze to mostly work. Definitely do not apply to trunk. This version of the patch includes the workaround of adding as the dummy 'tahoe' argument so you don't need to. refs #585

Line 
12 patches for repository http://tahoe-lafs.org/source/tahoe-lafs/trunk:
2
3Mon Jan  3 06:28:23 GMT Standard Time 2011  david-sarah@jacaranda.org
4  * Various hacks to get bb-freeze to mostly work. Do not apply to trunk. refs #585
5
6Mon Jan  3 06:43:08 GMT Standard Time 2011  david-sarah@jacaranda.org
7  * Workaround for argument off-by-one error when using bb-freeze. Definitely do not apply to trunk. refs #585
8
9New patches:
10
11[Various hacks to get bb-freeze to mostly work. Do not apply to trunk. refs #585
12david-sarah@jacaranda.org**20110103062823
13 Ignore-this: 5e4437383d4dd4a663a79fb2827402e0
14] {
15hunk ./src/allmydata/__init__.py 15
16 # that would be an undocumented property of the setuptools implementation.
17 
18 from allmydata import _auto_deps
19-_auto_deps.require_auto_deps()
20+#_auto_deps.require_auto_deps()
21 
22 # This is just to suppress DeprecationWarnings from nevow and twisted.
23 # See http://allmydata.org/trac/tahoe/ticket/859 and
24hunk ./src/allmydata/__init__.py 178
25     else:
26         return platform.platform()
27 
28-def get_package_versions_from_setuptools():
29-    import pkg_resources
30-    return dict([(p.project_name, (p.version, p.location)) for p in pkg_resources.require(__appname__)])
31-
32 def package_dir(srcfile):
33     return os.path.dirname(os.path.dirname(os.path.normcase(os.path.realpath(srcfile))))
34 
35hunk ./src/allmydata/__init__.py 186
36     # (Python and platform, and sqlite3 if you are on Python >= 2.5), and
37     # because setuptools might fail to find something even though import
38     # finds it:
39-    import OpenSSL, allmydata, foolscap.api, nevow, platform, pycryptopp, setuptools, simplejson, twisted, zfec, zope.interface
40+    import OpenSSL
41+    import allmydata
42+    import foolscap.api
43+    import nevow
44+    import platform
45+    import pycryptopp
46+    import simplejson
47+    import twisted
48+    import zfec
49+    import zope.interface
50     pysqlitever = None
51     pysqlitefile = None
52     sqlitever = None
53hunk ./src/allmydata/__init__.py 221
54         'foolscap': (foolscap.api.__version__, package_dir(foolscap.__file__)),
55         'Nevow': (nevow.__version__, package_dir(nevow.__file__)),
56         'pycryptopp': (pycryptopp.__version__, package_dir(pycryptopp.__file__)),
57-        'setuptools': (setuptools.__version__, package_dir(setuptools.__file__)),
58+        #'setuptools': (setuptools.__version__, package_dir(setuptools.__file__)),
59         'simplejson': (simplejson.__version__, package_dir(simplejson.__file__)),
60         'pysqlite': (pysqlitever, pysqlitefile),
61         'sqlite': (sqlitever, 'unknown'),
62hunk ./src/allmydata/__init__.py 232
63         'platform': (get_platform(), None),
64         }
65 
66-    # But we prefer to get all the dependencies as known by setuptools:
67-    import pkg_resources
68-    try:
69-        d2 = get_package_versions_from_setuptools()
70-    except pkg_resources.DistributionNotFound:
71-        # See docstring in _auto_deps.require_auto_deps() to explain why it makes sense to ignore this exception.
72-        pass
73-    else:
74-        d1.update(d2)
75-
76     return d1
77 
78 def get_package_versions():
79adddir ./windows
80addfile ./windows/tahoe.py
81hunk ./windows/tahoe.py 1
82+from allmydata.util import pkgresutil # override the pkg_resources zip provider for py2exe deployment
83+pkgresutil.install() # this is done before nevow is imported
84hunk ./windows/tahoe.py 4
85+# import dependencies so that py2exe finds them
86+
87+# nevow requires all these for its voodoo module import time adaptor registrations
88+from nevow import accessors, appserver, static, rend, url, util, query, i18n, flat
89+from nevow import guard, stan, testutil, context
90+from nevow.flat import flatmdom, flatstan, twist
91+from formless import webform, processors, annotate, iformless
92+from decimal import Decimal
93+
94+import allmydata.web
95+
96+# junk to appease pyflakes's outrage at py2exe's needs
97+[
98+    accessors, appserver, static, rend, url, util, query, i18n, flat, guard, stan, testutil,
99+    context, flatmdom, flatstan, twist, webform, processors, annotate, iformless, Decimal,
100+    allmydata,
101+]
102+
103+from allmydata.scripts import runner
104+
105+runner.run()
106}
107[Workaround for argument off-by-one error when using bb-freeze. Definitely do not apply to trunk. refs #585
108david-sarah@jacaranda.org**20110103064308
109 Ignore-this: e814e495ce7f7ee9c2ceb02944a74c05
110] hunk ./src/allmydata/windows/fixups.py 201
111             argv[0] = u'-c'
112             break
113 
114-    sys.argv = argv
115+    sys.argv = ['tahoe'] + argv
116
117Context:
118
119[bin/tahoe-script.template: On non-Windows, invoke support/bin/tahoe directly as a script (rather than via python), so that 'top' for example will show it as 'tahoe'. On Windows, simplify some code that set argv[0], which is never used. fixes #174
120david-sarah@jacaranda.org**20101127232650
121 Ignore-this: 42a86f3eecfdc1ea7b76a7cc68626898
122]
123[test_runner: avoid unnecessary use of non-ASCII.
124david-sarah@jacaranda.org**20110101100101
125 Ignore-this: e2ff40dce6bb3b021306f2913d4e75df
126]
127[docs/quickstart.html: fix redundant, badly nested tag. refs #1284
128david-sarah@jacaranda.org**20110102175159
129 Ignore-this: 2ae9cc0b47d2e87b9eb64a0f517c4eef
130]
131[docs/quickstart.html: information about 'troublesome dependencies' and 'verified systems' de-emphasized by smaller italic font. Re-wrap so that the HTML source is readable (just about) as text. Minor wording tweaks. Improve organization by adding 'Windows Caveats' subsection. fixes #1284
132david-sarah@jacaranda.org**20110102174212
133 Ignore-this: e9dc57983974478200856651c5318fee
134]
135[NEWS: update entry for removal of Mac and Windows apps. refs #1282
136david-sarah@jacaranda.org**20101226042245
137 Ignore-this: c8099bc6e8235718d042c9a13c1e2425
138]
139[Move dependency imports from windows/depends.py (which has gone away) into src/allmydata/windows/tahoesvc.py. Also fix a pyflakes warning, and change the service display name from 'Allmydata Tahoe Node' to 'Tahoe-LAFS node'. refs #1282
140david-sarah@jacaranda.org**20101226042100
141 Ignore-this: ee45f324934e1251380206dbee6346d0
142]
143[Remove unmaintained Windows GUI app, except for windows/tahoesvc.py which is moved to src/allmydata/windows. refs #1282
144david-sarah@jacaranda.org**20101226040237
145 Ignore-this: cae37b6622a7dd5940acc7d3e6a98b90
146]
147[Remove the Makefile targets relating to the Mac GUI app. refs #1282
148david-sarah@jacaranda.org**20101226025859
149 Ignore-this: 75303be783974b41138744ec62b07965
150]
151[NEWS: remove unmaintained Mac GUI app. refs #1282
152david-sarah@jacaranda.org**20101226020858
153 Ignore-this: 40474a07f4a550b48563d35350be7ab5
154]
155[Remove unmaintained Mac GUI app. fixes #1282
156david-sarah@jacaranda.org**20101226020508
157 Ignore-this: b3613bf1abfd284d542bf7c753ec557a
158]
159[Remove src/allmydata/util/find_exe.py which is no longer used. fixes #1150
160david-sarah@jacaranda.org**20101226023206
161 Ignore-this: 7436c9b53bf210aed34a1a973cd9cace
162]
163[status_web_pages_review.darcs.patch
164freestorm77@gmail.com**20110102034214
165 Ignore-this: 29f1ecb36177f10f3f846b3d56b313b2
166 
167 I make some changes on status web pages
168 
169 status.xhtml:
170 - Delete unused webform_css link
171 - Align tables on the left
172 
173 tahoe-css:
174 - Do some minor changes on code synthax
175 - changes table.status-download-events style to look like other tables
176 
177 status.py:
178 - Align table on the left
179 - Changes table header
180 - Add heading tags
181 - Modify google api graph: add image border, calculate height to feet data
182 
183 signed-off-by: zooko@zooko.com
184 fixes #1219
185]
186[test_storage.py: fix a pyflakes unused import warning.
187david-sarah@jacaranda.org**20101231220756
188 Ignore-this: df08231540cb7dff9d2b038e47ab30ee
189]
190[test_storage.py: leave at least 512 MiB free when running test_large_share. refs #1195
191david-sarah@jacaranda.org**20101231203215
192 Ignore-this: b2144c0341c3452b5d4ba219e284ea0e
193]
194[storage: use fileutil's version of get_disk_stats() and get_available_space(), use mockery/fakery in tests, enable large share test on platforms with sparse files and if > 4 GiB of disk space is currently available
195zooko@zooko.com**20100910173629
196 Ignore-this: 1304f1164c661de6d5304f993eb9b27b
197]
198[fileutil: copy in the get_disk_stats() and get_available_space() functions from storage/server.py
199zooko@zooko.com**20100910173520
200 Ignore-this: 8b15569715f710f4fc5092f7ca109253
201]
202[Update foolscap version requirement to 0.6.0, to address http://foolscap.lothar.com/trac/ticket/167
203david-sarah@jacaranda.org**20101231060039
204 Ignore-this: 98d2b8086a1a500b9f4565bca5a3810
205]
206[docs/webapi.rst: typos.
207david-sarah@jacaranda.org**20101230034422
208 Ignore-this: d1f5166d72cc711f7e0d9981eac9105e
209]
210[docs/webapi.rst: capitalization, formatting of section on URL character encoding, and a correction about Internet Explorer.
211david-sarah@jacaranda.org**20101230034049
212 Ignore-this: b3b9819d2fb264b4cdc5c8afd4e8c48d
213]
214[docs: corrections and clarifications.
215david-sarah@jacaranda.org**20101227051056
216 Ignore-this: e33202858c7644c58f3f924b164294b6
217]
218[docs: more formatting cleanups and corrections. Spell webapi and wapi as web-API.
219david-sarah@jacaranda.org**20101227050533
220 Ignore-this: 18b23cbfb780df585d8a722a1ec63e94
221]
222[docs/debian.rst: bring description of building dependencies from source up-to-date, and change hostname from allmydata.com to tahoe-lafs.org.
223david-sarah@jacaranda.org**20101212222912
224 Ignore-this: f38462afc88b4475195610385a28391c
225]
226[docs/architecture.rst: correct rst syntax.
227david-sarah@jacaranda.org**20101212202003
228 Ignore-this: 3fbe12feb28bec6f1c63aedbc79aad21
229]
230[docs/architecture.rst: formatting.
231david-sarah@jacaranda.org**20101212201719
232 Ignore-this: 305fa5dfc2939355eaf6d0d2161eb1ff
233]
234[docs: linkification, wording improvements.
235david-sarah@jacaranda.org**20101212201234
236 Ignore-this: 4e67287f527a8bc728cfbd93255d2aae
237]
238[docs: formatting.
239david-sarah@jacaranda.org**20101212201115
240 Ignore-this: 2e0ed394ac7726651d3a4f2c4b0d3798
241]
242[docs/configuration.rst: more formatting tweaks; which -> that.
243david-sarah@jacaranda.org**20101212195522
244 Ignore-this: a7becb7021854ca5a90edd892b36fdd7
245]
246[docs/configuration.rst: more changes to formatting.
247david-sarah@jacaranda.org**20101212194511
248 Ignore-this: 491aac33e5f5268d224359f1447d10be
249]
250[docs/configuration.rst: changes to formatting (mainly putting commands and filenames in monospace).
251david-sarah@jacaranda.org**20101212181828
252 Ignore-this: 8a1480e2d5f43bee678476424615b50f
253]
254[scripts/backupdb.py: more accurate comment about path field.
255david-sarah@jacaranda.org**20101212170320
256 Ignore-this: 50e47a2228a85207bbcd188a78a0d4e6
257]
258[scripts/cli.py: fix missing 'put' in usage example for 'tahoe put'.
259david-sarah@jacaranda.org**20101212170207
260 Ignore-this: 2cbadf066fff611fc03d3c0ff97ce6ec
261]
262[docs/frontends/CLI.rst: changes to formatting (mainly putting commands and filenames in monospace), and to command syntax to reflect that DIRCAP/... is accepted. Clarify the syntax of 'tahoe put' and other minor corrections. Tahoe -> Tahoe-LAFS.
263david-sarah@jacaranda.org**20101212165800
264 Ignore-this: a123ef6b564aa8624d1e79c97068ea12
265]
266[docs/frontends/CLI.rst: Unicode arguments to 'tahoe' work on Windows as of v1.7.1.
267david-sarah@jacaranda.org**20101212063740
268 Ignore-this: 3977a99dfa86ac33a44171deaf43aaab
269]
270[docs/known_issues.rst: fix title and linkify another URL. refs #1225
271david-sarah@jacaranda.org**20101212062817
272 Ignore-this: cc91287f7fb51c23440b3d2fe79c449c
273]
274[docs/known_issues.rst: fix an external link. refs #1225
275david-sarah@jacaranda.org**20101212062435
276 Ignore-this: b8cbf12f353131756c358965c48060ec
277]
278[Fix a link from uri.rst to dirnodes.rst. refs #1225
279david-sarah@jacaranda.org**20101212054502
280 Ignore-this: af6205299f5c9a33229cab259c00f9d5
281]
282[Fix a link from webapi.rst to FTP-and-SFTP.rst. refs #1225
283david-sarah@jacaranda.org**20101212053435
284 Ignore-this: 2b9f88678c3447ea860d6b61e8799858
285]
286[More specific hyperlink to architecture.rst from helper.rst. refs #1225
287david-sarah@jacaranda.org**20101212052607
288 Ignore-this: 50424c768fca481252fabf58424852dc
289]
290[Update hyperlinks between docs, and linkify some external references. refs #1225
291david-sarah@jacaranda.org**20101212051459
292 Ignore-this: cd43a4c3d3de1f832abfa88d5fc4ace1
293]
294[docs/specifications/dirnodes.rst: fix references to mutable.rst. refs #1225
295david-sarah@jacaranda.org**20101212012720
296 Ignore-this: 6819b4b4e06e947ee48b365e840db37d
297]
298[docs/specifications/mutable.rst: correct the magic string for v1 mutable containers. refs #1225
299david-sarah@jacaranda.org**20101212011400
300 Ignore-this: 99a5fcdd40cef83dbb08f323f6cdaaca
301]
302[Move .txt files in docs/frontends and docs/specifications to .rst. refs #1225
303david-sarah@jacaranda.org**20101212010251
304 Ignore-this: 8796d35d928370f7dc6ad2dafdc1c0fe
305]
306[Convert docs/frontends and docs/specifications to reStructuredText format (not including file moves).
307david-sarah@jacaranda.org**20101212004632
308 Ignore-this: e3ceb2d832d73875abe48624ddbb5622
309]
310[scripts/cli.py: remove the disclaimer in the help for 'tahoe cp' that it does not handle non-ASCII filenames well. (At least, we intend to handle them.)
311david-sarah@jacaranda.org**20101130002145
312 Ignore-this: 94c003efaa20b9eb4a83503d79844ca
313]
314[relnotes.txt: fifth -> sixth labor-of-love release
315zooko@zooko.com**20101129045647
316 Ignore-this: 21c245015268b38916e3a138d256c09d
317]
318[Makefile: BB_BRANCH is set to the empty string for trunk, not the string 'trunk'.
319david-sarah@jacaranda.org**20101128233512
320 Ignore-this: 5a7ef8eb10475636d21b91e25b56c369
321]
322[relnotes.txt: eleventh -> twelfth release.
323david-sarah@jacaranda.org**20101128223321
324 Ignore-this: 1e26410156a665271c1170803dea2c0d
325]
326[relnotes.tst: point to known_issues.rst, not known_issues.txt.
327david-sarah@jacaranda.org**20101128222918
328 Ignore-this: 60194eb4544cac446fe4f60b3e34b887
329]
330[quickstart.html: fix link to point to allmydata-tahoe-1.8.1.zip.
331david-sarah@jacaranda.org**20101128221728
332 Ignore-this: 7b3ee86f8256aa12f5d862f689f3ee29
333]
334[TAG allmydata-tahoe-1.8.1
335david-sarah@jacaranda.org**20101128212336
336 Ignore-this: 9c18bdeaef4822f590d2a0d879e00621
337]
338Patch bundle hash:
3396df823d3e1575e44127b6b38149c251505907dae