Ticket #1233: zetuptoolz-prefer-platform-specific-dists.darcs.patch

File zetuptoolz-prefer-platform-specific-dists.darcs.patch, 15.6 KB (added by davidsarah, at 2010-11-03T04:13:36Z)

bundled zetuptools: prefer platform-specific dists to platform-independent ones. refs #1233

Line 
11 patch for repository davidsarah@dev.allmydata.org:/home/darcs/tahoe/trunk:
2
3Wed Nov  3 03:47:40 GMT Standard Time 2010  david-sarah@jacaranda.org
4  * bundled zetuptools: prefer platform-specific dists to platform-independent ones. refs #1233
5
6New patches:
7
8[bundled zetuptools: prefer platform-specific dists to platform-independent ones. refs #1233
9david-sarah@jacaranda.org**20101103034740
10 Ignore-this: dad21647659e5f1f821355dc73dc33b5
11] {
12hunk ./setuptools-0.6c16dev2.egg/pkg_resources.py 796
13         This calls the ``find(req)`` method of the `working_set` to see if a
14         suitable distribution is already active.  (This may raise
15         ``VersionConflict`` if an unsuitable version of the project is already
16-        active in the specified `working_set`.)  If a suitable distribution
17-        isn't active, this method returns the newest distribution in the
18-        environment that meets the ``Requirement`` in `req`.  If no suitable
19-        distribution is found, and `installer` is supplied, then the result of
20-        calling the environment's ``obtain(req, installer)`` method will be
21-        returned.
22+        active in the specified `working_set`.)
23+
24+        If a suitable distribution isn't active, this method returns the
25+        newest platform-dependent distribution in the environment that meets
26+        the ``Requirement`` in `req`. If no suitable platform-dependent
27+        distribution is found, then the newest platform-independent
28+        distribution that meets the requirement is returned. (A platform-
29+        dependent distribution will typically have code compiled or
30+        specialized for that platform.)
31+
32+        Otherwise, if `installer` is supplied, then the result of calling the
33+        environment's ``obtain(req, installer)`` method will be returned.
34         """
35         dist = working_set.find(req)
36         if dist is not None:
37hunk ./setuptools-0.6c16dev2.egg/pkg_resources.py 812
38             return dist
39+
40+        # first try to find a platform-dependent dist
41+        for dist in self[req.key]:
42+            if dist in req and dist.platform is not None:
43+                return dist
44+
45+        # then try any other dist
46         for dist in self[req.key]:
47             if dist in req:
48                 return dist
49hunk ./setuptools-0.6c16dev2.egg/pkg_resources.py 822
50+
51         return self.obtain(req, installer) # try and download/install
52 
53     def obtain(self, requirement, installer=None):
54}
55
56Context:
57
58[setup: FreeStorm's WinXP-x86-py2.6 buildslave has informed us that there is yet a fourth way to spell "i386" in Python
59zooko@zooko.com**20101101052142
60 Ignore-this: 732892975c19f7fd18caeb071f09ef7
61]
62[setup: add platform.machine() to show-tool-versions, because FreeStorm WinXP builder apparently thinks that its platform.machine() is not one of ['i386', 'x86_64', 'amd64', ''], since it is requiring pycryptopp >= 0.5.14 instead of pycryptopp >= 0.5.20
63zooko@zooko.com**20101101042721
64 Ignore-this: 322a3e5af9785ebca3452f3937ce47a4
65]
66[edit docs for English usage, rename "Tahoe" to "Tahoe-LAFS" in docs/configuration.rst, rename a variable in bin/tahoe-script.template for clarity, update François's CREDITS entry
67zooko@zooko.com**20101101042602
68 Ignore-this: d192c4c9660b1b9173db19d0e533dc22
69]
70[test_runner.py: fix test failure in test_the_right_code after applying zooko's change to test-with-fake-pkg.py
71david-sarah@jacaranda.org**20101102035905
72 Ignore-this: 71b467615ae7dcdfbf84049e60a08933
73]
74[allmydata/__init__.py: move the call to require_auto_deps() to the top again, since the [4784] patch turned out not to be the cause of the failure on the 'mm netbsd5' buildslave.
75david-sarah@jacaranda.org**20101101003316
76 Ignore-this: 879a5188ff2529fb755b6e594c59aeb2
77]
78[allmydata/__init__.py: put the _auto_deps.require_auto_deps() call back in exactly the same place it was prior to [4784].
79david-sarah@jacaranda.org**20101031174649
80 Ignore-this: c5f4fbb2c444d7b05b1d30a199b6178f
81]
82[allmydata/__init__.py: suppress a DeprecationWarning for the sha module on importing pycrypto.
83david-sarah@jacaranda.org**20101031160636
84 Ignore-this: 414d55a0da432cfb0d65329a88e13396
85]
86[misc/build_helpers/run_trial.py: fix another typo in last patch.
87david-sarah@jacaranda.org**20101031160332
88 Ignore-this: 61131c5775a2393b6862f76b7bc222f
89]
90[misc/build_helpers/run_trial.py: fix typo in last patch.
91david-sarah@jacaranda.org**20101031155215
92 Ignore-this: a2fbecf858c0a399e938d4f1ade7329b
93]
94[allmydata/__init__.py: call require_auto_deps() after importing nevow and twisted, reverting change in [4784]. Also fix a missing 'warnings.filters.pop()'.
95david-sarah@jacaranda.org**20101031153828
96 Ignore-this: 8a5cd7798674d56868e9c333a77a4ac2
97]
98[misc/build_helpers/run_trial.py: fix false positive on directory check that can occur when running run_trial from test-with-fake-pkg manually.
99david-sarah@jacaranda.org**20101031153613
100 Ignore-this: 7d4a0758a305cbfdd296570a9c1a88d2
101]
102[allmydata.__init__.py: temporary hack to debug failure on midnightmagic's buildslave
103david-sarah@jacaranda.org**20101031055003
104 Ignore-this: 2ac28b2f19a436a374399b4c59d29cc7
105]
106[NEWS: entries for #1190 and #1212, and minor cleanups. refs #1190, #1212
107david-sarah@jacaranda.org**20101031051426
108 Ignore-this: c318dff69296ae1e1a897752b5221870
109]
110[tahoe backup: perform tilde expansion in exclude-from filename (version 2). fixes #1241
111david-sarah@jacaranda.org**20101031035231
112 Ignore-this: 65e6cd2247dd8d1fc025758d740708c0
113]
114[NEWS: add news entry for #1223
115Francois Deppierraz <francois@ctrlaltdel.ch>**20101030111130
116 Ignore-this: 6b6afd4b0f0527a3c9784c1db95d083
117]
118[NEWS: add a NEWS entry about bug #1045
119Francois Deppierraz <francois@ctrlaltdel.ch>**20101030101351
120 Ignore-this: 7e758afbbd0f1d22a5d0b4fc38661c1d
121]
122[setup: run require_auto_deps() before attempting to import any deps in __init__.py
123zooko@zooko.com**20101030081035
124 Ignore-this: ffcaf2450628543e020e9919e455f691
125 For one thing, this makes missing-dependency failures into DistributionNotFound errors instead of ImportErrors, which might be more useful to the user. For another thing, if someone is using distributions that were installed with --multi-version, then they might be not importable until after require_auto_deps() has been run. (The docs claim that this would be the case, but we don't have an example of this happening at this time.)
126]
127[setup: show-tool-versions: emit module and __version__ information even when module name != distribution (package) name, and add TwistedCore, TwistedWeb, and TwistedConch
128zooko@zooko.com**20101030070233
129 Ignore-this: 3df19910090d44502ddeeef5d9c29a7
130]
131[misc/build_helpers/test-with-fake-pkg.py: look for eggs in the parent of the src directory. refs #1190
132david-sarah@jacaranda.org**20101030034303
133 Ignore-this: 4a3cf286272cdb5d06aac15fb5998b33
134]
135[scripts/runner.py: fix unused import of allmydata. refs #1190
136david-sarah@jacaranda.org**20101030003149
137 Ignore-this: b2fc67f6192ea7ccf8a5ad010ce74a64
138]
139[scripts/runner.py: remove pkg_resources.require() calls. These are at best redundant because we have already called _auto_deps.require_auto_deps() (from allmydata.__init__) at that point, and they are causing failure of the test-from-prefixdir step on some buildslaves. refs #1190
140david-sarah@jacaranda.org**20101029235328
141 Ignore-this: e00dee63acc7b76a5755025d75abf524
142]
143[misc/build_helpers/run_trial.py: look for zetuptoolz egg in the parent directory, not the cwd of run_trial. refs #1190
144david-sarah@jacaranda.org**20101029230329
145 Ignore-this: 1596fb8c290d1c706f079701b1857db8
146]
147[scripts/tahoe_backup.py: oops, fix missing import, thanks pyflakes
148Brian Warner <warner@lothar.com>**20101029094223
149 Ignore-this: 285c35af824935641a5be35c008b080c
150 
151 test_cli.py: hush minor pyflakes complaint
152]
153[mutable/servermap.py: update comment. Closes #1231.
154Brian Warner <warner@lothar.com>**20101029091424
155 Ignore-this: 80bf854123fc254e097a81b82bdf4990
156]
157[tahoe_cp.py: Don't call urllib.quote with an Unicode argument, fix #1224
158Brian Warner <warner@lothar.com>**20101029084520
159 Ignore-this: 5524722d5e5babbb73ca0969d54967f6
160 tahoe_backup.py: Fix another (potential) occurrence of calling urllib.quote()
161 with an Unicode parameter
162]
163[fix #1223, crash+inefficiency during repair due to read overrun
164Brian Warner <warner@lothar.com>**20101029082036
165 Ignore-this: e6aa0295ad254544da3b5cc41b33d862
166 
167 * repairer (really the uploader) reads beyond end of input file (Uploadable)
168 * new-downloader does not tolerate overreads
169 * uploader does lots of tiny reads (inefficient)
170 
171 This fixes the last two. The uploader still does a single overread at the end
172 of the input file, but now that's ok so we can leave it in place. The
173 uploader now expects the Uploadable to behave like a normal disk
174 file (reading beyond EOF will return less data than was asked for), and now
175 the new-downloadable behaves that way.
176]
177[add misc/build_helpers/test-with-fake-pkg.py. refs #1190
178david-sarah@jacaranda.org**20101029025150
179 Ignore-this: 995f220962708f1bad83092161130f67
180]
181[bundled zetuptoolz: if __main__.__requires__ exists then do not add packages to the working set if they provide an incompatible version of a package. Also put a complete __requires__ listing the transitive closure of dependencies at the beginning of generated scripts, rather than a shallow __requires__ specifying only the application version. refs #1190
182david-sarah@jacaranda.org**20101029223111
183 Ignore-this: a95f1967884340e53bf3adf90db40cfc
184]
185[setup.py, misc/build_helpers/run_trial.py: use undocumented __requires__ variable to cause setuptools/zetuptoolz to put the correct versions of dependencies on sys.path. Also ensure that run_trial adds the bundled zetuptoolz egg at the start of sys.path if present. Make the source directory comparison work correctly for the test-with-fake-pkg build step. refs #1190
186david-sarah@jacaranda.org**20101029222825
187 Ignore-this: 8b09366eb6ce3d55c7db5239077a0fac
188]
189[test_runner.py: fix error in BinTahoe.test_version_no_noise introduced by last patch. refs #1235
190david-sarah@jacaranda.org**20101029221123
191 Ignore-this: 4bf21ea34768e8e6adf104e56f939fd0
192]
193[test_runner.py: also allow 'from pkg_resources import load_entry_point' as noise. refs #1235.
194david-sarah@jacaranda.org**20101029204246
195 Ignore-this: a47440aa2cdd29ce55ac7c6c7f4bcaf2
196]
197[test_runner.py: if the only noise is 'UserWarning: Unbuilt egg for setuptools', skip instead of failing the no_noise tests. This version avoids 'any' to be compatible with Python < 2.5. refs #1235.
198david-sarah@jacaranda.org**20101029191804
199 Ignore-this: 83ca1543fc9673e664a8eeefe1eba429
200]
201[NEWS: clarify (strengthen) description of what backdoors.rst declares, and add bugfix entries for 'tahoe cp' and Windows console bugs. refs #1216, #1224, #1232
202david-sarah@jacaranda.org**20101028180046
203 Ignore-this: 1c3eef3cd353b06b6ee00ce87c5ef59a
204]
205[startstop_node.py: pyflakes import fix. refs #1190
206david-sarah@jacaranda.org**20101028014805
207 Ignore-this: 369ef5022c8ee5a0d8341af01553bcef
208]
209['tahoe start': use import+call rather than find+spawn
210"Brian Warner <warner@lothar.com>"**20101027061342
211 
212 This removes the need to use a locally-built (dependency) bin/twistd, and
213 removes a big chunk of behavior differences between unix and windows. It
214 also happens to resolve the "client node probably started" uncertainty.
215 Might help with #1190, #602, and #71.
216]
217[make ResponseCache smarter to avoid memory leaks: don't record timestamps, use DataSpans to merge entries, and clear the cache when we see a new seqnum. refs #1045, #1229
218david-sarah@jacaranda.org**20101027043302
219 Ignore-this: 88fd6fba7f35a2f8af1693b92718f5f3
220]
221[windows/fixups.py: limit length of string passed in a single call to WriteConsoleW. fixes #1232.
222david-sarah@jacaranda.org**20101027021636
223 Ignore-this: fbd99e0d22493974696d37925d97c7d6
224]
225[docs/known_issues.rst: Add section on traffic analysis. Fix URL for current version of file.
226david-sarah@jacaranda.org**20101024234259
227 Ignore-this: f3416e79d3bb833f5118da23e85723ad
228]
229[test_mutable.py: add test for ResponseCache memory leak. refs #1045, #1129
230david-sarah@jacaranda.org**20101024193409
231 Ignore-this: 3aee7f0677956cc6deaccb4d5b8e415f
232]
233[docs/running.html: fix missing end-quote, and change frontends/ doc references to .rst.
234david-sarah@jacaranda.org**20101024171500
235 Ignore-this: 47c645a6595e1790b1d1adfa71af0e1d
236]
237[docs/running.html: 'tahoe create-client' now creates a node with storage disabled. Also change configuration.txt references to configuration.rst.
238david-sarah@jacaranda.org**20101024170431
239 Ignore-this: e5b048055494ba3505bb8a506610681c
240]
241[test_encodingutil.py: test_argv_to_unicode modified the wrong encoding variable. fixes #1214
242david-sarah@jacaranda.org**20101023035810
243 Ignore-this: e5f1f849931b96939facc53d93ff61c5
244]
245[doc: add explanation of the motivation for the surprising and awkward API to erasure coding
246zooko@zooko.com**20101015060202
247 Ignore-this: 428913ff6e1bf5b393deffb1f20b949b
248]
249[setup: catch and log ValueError from locale.getdefaultlocale() in show-tool-versions.py
250zooko@zooko.com**20101015054440
251 Ignore-this: 827d91490562c32ed7cf6526dfded773
252 I got a bug report from Mathias Baert showing that locale.getdefaultlocale() raises an exception on his Mac OS X system. Heh.
253]
254[docs: update how-to-make-a-release doc with a few tweaks from the 1.8.0 process
255zooko@zooko.com**20101015054413
256 Ignore-this: ca5e9478531a3393792ae283239549dd
257]
258[docs: update NEWS ref: #1216
259zooko@zooko.com**20101015053719
260 Ignore-this: 2e0b92e4145d667cdf075e64b7965530
261]
262[docs: fix tab-vs-spaces, make some CLI examples <tt>/"literal", wrap some to
263Brian Warner <warner@lothar.com>**20101015060606
264 Ignore-this: eae08bdf0afb19a2fbf41c31e70a8122
265 80-cols, remove spurious whitespace. Add rst2html.py rule to Makefile.
266]
267[docs: add Peter Secor, Shawn Willden, and Terrell Russell as signatories to docs/backdoors.rst
268zooko@zooko.com**20101015053242
269 Ignore-this: c77adf819d664f673e17c4aaeb353f33
270]
271[docs: convert all .txt docs to .rst thanks to Ravi Pinjala
272zooko@zooko.com**20101015052913
273 Ignore-this: 178a5122423189ecfc45b142314a78ec
274 fixes #1225
275]
276[docs: add statement on our refusal to insert backdoors
277zooko@zooko.com**20101006051147
278 Ignore-this: 644d308319a7b80c4434bdff9760404a
279]
280[setup: add --multi-version to the "setup.py develop" command-line
281zooko@zooko.com**20101005182350
282 Ignore-this: 709155cc21caff29826b8d41a8c8d63d
283 fixes #530. I earlier tried this twice (see #530 for history) and then twice rolled it back due to some problems that arose. However, I didn't write down what the problems were in enough detail on the ticket that I can tell today whether those problems are still issues, so here goes the third attempt. (I did write down on the ticket that it would not create site.py or .pth files in the target directory with --multi-version mode, but I didn't explain why *that* was a problem.)
284]
285[setup: use execfile to access _auto_deps.py in its proper location of src/allmydata/ instead of copying it into place when setup.py is executed
286zooko@zooko.com**20100906055714
287 Ignore-this: c179b42672d775580afad40121f86812
288]
289[trivial: M-x whitespace-cleanup
290zooko@zooko.com**20100903144712
291 Ignore-this: 1bb764d11ac69b4a35ea091cfb13158a
292]
293[minor: remove unused interface declaration, change allmydata.org to tahoe-lafs.org in email address, fix wording in relnotes.txt
294zooko@zooko.com**20100930153708
295 Ignore-this: a452969228afed2774de375e29fa3048
296]
297[immutable/repairer.py: don't use the default happiness setting when repairing
298Kevan Carstensen <kevan@isnotajoke.com>**20100927200102
299 Ignore-this: bd704d9744b970849da8d46a16b8089a
300]
301[NEWS: note dependency updates to pycryptopp and pycrypto.
302david-sarah@jacaranda.org**20100924191207
303 Ignore-this: eeaf5c9c9104f24c450c2ec4482ac1ee
304]
305[TAG allmydata-tahoe-1.8.0
306zooko@zooko.com**20100924021631
307 Ignore-this: 494ca0a885c5e20c883845fc53e7ab5d
308]
309Patch bundle hash:
3108b25e20eed8d6aab963834d6f62a9aff7064d3de