Merge lp://staging/~gary/lazr.batchnavigator/license_and_build into lp://staging/~launchpad-pqm/lazr.batchnavigator/trunk
- license_and_build
- Merge into trunk
Proposed by
Gary Poster
Status: | Merged |
---|---|
Approved by: | Francis J. Lacoste |
Approved revision: | 28 |
Merged at revision: | not available |
Proposed branch: | lp://staging/~gary/lazr.batchnavigator/license_and_build |
Merge into: | lp://staging/~launchpad-pqm/lazr.batchnavigator/trunk |
Diff against target: | None lines |
To merge this branch: | bzr merge lp://staging/~gary/lazr.batchnavigator/license_and_build |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Francis J. Lacoste (community) | Approve | ||
Review via email:
|
Commit message
Description of the change
To post a comment you must log in.
Revision history for this message
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Gary Poster (gary) wrote : | # |
Revision history for this message
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Francis J. Lacoste (flacoste) wrote : | # |
On March 24, 2009, Gary Poster wrote:
> Gary Poster has proposed merging
> lp:~gary/lazr.batchnavigator/license_and_build into
> lp:~launchpad-pqm/lazr.batchnavigator/trunk.
>
> Requested reviews:
> LAZR Developers (lazr-developers)
>
> The same changes as for the other lazr packages:
>
> - license specifies v3 of LGPL
>
> - buildout updates
>
status approved
review approve
All good.
--
Francis J. Lacoste
<email address hidden>
review:
Approve
Revision history for this message
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Gary Poster (gary) wrote : | # |
This was a mistaken review request. It simply updates the date, as requested in the review of lp:~gary/lazr.batchnavigator/build-license-changes. Sorry for the noise.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file '.bzrignore' | |||
2 | --- .bzrignore 2009-03-03 19:43:53 +0000 | |||
3 | +++ .bzrignore 2009-03-23 16:14:28 +0000 | |||
4 | @@ -3,6 +3,9 @@ | |||
5 | 3 | .installed.cfg | 3 | .installed.cfg |
6 | 4 | develop-eggs | 4 | develop-eggs |
7 | 5 | parts | 5 | parts |
9 | 6 | src/lazr.batchnavigator.egg-info | 6 | *.egg-info |
10 | 7 | tags | 7 | tags |
11 | 8 | TAGS | 8 | TAGS |
12 | 9 | build | ||
13 | 10 | *.egg | ||
14 | 11 | dist | ||
15 | 9 | 12 | ||
16 | === modified file 'HACKING.txt' | |||
17 | --- HACKING.txt 2009-03-03 19:43:53 +0000 | |||
18 | +++ HACKING.txt 2009-03-23 16:14:28 +0000 | |||
19 | @@ -1,18 +1,18 @@ | |||
20 | 1 | .. | 1 | .. |
21 | 2 | This file is part of lazr.batchnavigator. | 2 | This file is part of lazr.batchnavigator. |
22 | 3 | 3 | ||
27 | 4 | lazr.batchnavigator is free software: you can redistribute it and/or modify it | 4 | lazr.batchnavigator is free software: you can redistribute it and/or |
28 | 5 | under the terms of the GNU Lesser General Public License as published by | 5 | modify it under the terms of the GNU Lesser General Public License as |
29 | 6 | the Free Software Foundation, either version 3 of the License, or (at your | 6 | published by the Free Software Foundation, version 3 of the License. |
26 | 7 | option) any later version. | ||
30 | 8 | 7 | ||
34 | 9 | lazr.batchnavigator is distributed in the hope that it will be useful, but WITHOUT | 8 | lazr.batchnavigator is distributed in the hope that it will be useful, but |
35 | 10 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 9 | WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY |
36 | 11 | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 10 | or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public |
37 | 12 | License for more details. | 11 | License for more details. |
38 | 13 | 12 | ||
39 | 14 | You should have received a copy of the GNU Lesser General Public License | 13 | You should have received a copy of the GNU Lesser General Public License |
41 | 15 | along with lazr.batchnavigator. If not, see <http://www.gnu.org/licenses/>. | 14 | along with lazr.batchnavigator. If not, see |
42 | 15 | <http://www.gnu.org/licenses/>. | ||
43 | 16 | 16 | ||
44 | 17 | This project uses zc.buildout for development. | 17 | This project uses zc.buildout for development. |
45 | 18 | 18 | ||
46 | 19 | 19 | ||
47 | === added file 'MANIFEST.in' | |||
48 | --- MANIFEST.in 1970-01-01 00:00:00 +0000 | |||
49 | +++ MANIFEST.in 2009-03-24 15:07:42 +0000 | |||
50 | @@ -0,0 +1,2 @@ | |||
51 | 1 | exclude MANIFEST.in buildout.cfg bootstrap.py .bzrignore | ||
52 | 2 | prune _bootstrap | ||
53 | 0 | 3 | ||
54 | === modified file 'README.txt' | |||
55 | --- README.txt 2009-03-05 23:19:16 +0000 | |||
56 | +++ README.txt 2009-03-23 16:14:28 +0000 | |||
57 | @@ -3,15 +3,15 @@ | |||
58 | 3 | .. | 3 | .. |
59 | 4 | This file is part of lazr.batchnavigator. | 4 | This file is part of lazr.batchnavigator. |
60 | 5 | 5 | ||
65 | 6 | lazr.batchnavigator is free software: you can redistribute it and/or modify it | 6 | lazr.batchnavigator is free software: you can redistribute it and/or |
66 | 7 | under the terms of the GNU Lesser General Public License as published by | 7 | modify it under the terms of the GNU Lesser General Public License as |
67 | 8 | the Free Software Foundation, either version 3 of the License, or (at your | 8 | published by the Free Software Foundation, version 3 of the License. |
64 | 9 | option) any later version. | ||
68 | 10 | 9 | ||
72 | 11 | lazr.batchnavigator is distributed in the hope that it will be useful, but WITHOUT | 10 | lazr.batchnavigator is distributed in the hope that it will be useful, but |
73 | 12 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 11 | WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY |
74 | 13 | FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 12 | or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public |
75 | 14 | License for more details. | 13 | License for more details. |
76 | 15 | 14 | ||
77 | 16 | You should have received a copy of the GNU Lesser General Public License | 15 | You should have received a copy of the GNU Lesser General Public License |
79 | 17 | along with lazr.batchnavigator. If not, see <http://www.gnu.org/licenses/>. | 16 | along with lazr.batchnavigator. If not, see |
80 | 17 | <http://www.gnu.org/licenses/>. | ||
81 | 18 | 18 | ||
82 | === added directory '_bootstrap' | |||
83 | === added file '_bootstrap/COPYRIGHT.txt' | |||
84 | --- _bootstrap/COPYRIGHT.txt 1970-01-01 00:00:00 +0000 | |||
85 | +++ _bootstrap/COPYRIGHT.txt 2009-03-24 15:07:42 +0000 | |||
86 | @@ -0,0 +1,9 @@ | |||
87 | 1 | Copyright (c) 2004-2009 Zope Corporation and Contributors. | ||
88 | 2 | All Rights Reserved. | ||
89 | 3 | |||
90 | 4 | This software is subject to the provisions of the Zope Public License, | ||
91 | 5 | Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. | ||
92 | 6 | THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED | ||
93 | 7 | WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
94 | 8 | WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS | ||
95 | 9 | FOR A PARTICULAR PURPOSE. | ||
96 | 0 | 10 | ||
97 | === added file '_bootstrap/LICENSE.txt' | |||
98 | --- _bootstrap/LICENSE.txt 1970-01-01 00:00:00 +0000 | |||
99 | +++ _bootstrap/LICENSE.txt 2009-03-24 15:07:42 +0000 | |||
100 | @@ -0,0 +1,54 @@ | |||
101 | 1 | Zope Public License (ZPL) Version 2.1 | ||
102 | 2 | ------------------------------------- | ||
103 | 3 | |||
104 | 4 | A copyright notice accompanies this license document that | ||
105 | 5 | identifies the copyright holders. | ||
106 | 6 | |||
107 | 7 | This license has been certified as open source. It has also | ||
108 | 8 | been designated as GPL compatible by the Free Software | ||
109 | 9 | Foundation (FSF). | ||
110 | 10 | |||
111 | 11 | Redistribution and use in source and binary forms, with or | ||
112 | 12 | without modification, are permitted provided that the | ||
113 | 13 | following conditions are met: | ||
114 | 14 | |||
115 | 15 | 1. Redistributions in source code must retain the | ||
116 | 16 | accompanying copyright notice, this list of conditions, | ||
117 | 17 | and the following disclaimer. | ||
118 | 18 | |||
119 | 19 | 2. Redistributions in binary form must reproduce the accompanying | ||
120 | 20 | copyright notice, this list of conditions, and the | ||
121 | 21 | following disclaimer in the documentation and/or other | ||
122 | 22 | materials provided with the distribution. | ||
123 | 23 | |||
124 | 24 | 3. Names of the copyright holders must not be used to | ||
125 | 25 | endorse or promote products derived from this software | ||
126 | 26 | without prior written permission from the copyright | ||
127 | 27 | holders. | ||
128 | 28 | |||
129 | 29 | 4. The right to distribute this software or to use it for | ||
130 | 30 | any purpose does not give you the right to use | ||
131 | 31 | Servicemarks (sm) or Trademarks (tm) of the copyright | ||
132 | 32 | holders. Use of them is covered by separate agreement | ||
133 | 33 | with the copyright holders. | ||
134 | 34 | |||
135 | 35 | 5. If any files are modified, you must cause the modified | ||
136 | 36 | files to carry prominent notices stating that you changed | ||
137 | 37 | the files and the date of any change. | ||
138 | 38 | |||
139 | 39 | Disclaimer | ||
140 | 40 | |||
141 | 41 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' | ||
142 | 42 | AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT | ||
143 | 43 | NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY | ||
144 | 44 | AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN | ||
145 | 45 | NO EVENT SHALL THE COPYRIGHT HOLDERS BE | ||
146 | 46 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
147 | 47 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
148 | 48 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
149 | 49 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
150 | 50 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||
151 | 51 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE | ||
152 | 52 | OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
153 | 53 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH | ||
154 | 54 | DAMAGE. | ||
155 | 0 | \ No newline at end of file | 55 | \ No newline at end of file |
156 | 1 | 56 | ||
157 | === renamed file 'bootstrap.py' => '_bootstrap/bootstrap.py' | |||
158 | === added symlink 'bootstrap.py' | |||
159 | === target is '_bootstrap/bootstrap.py' | |||
160 | === modified file 'buildout.cfg' | |||
161 | --- buildout.cfg 2009-03-03 19:43:53 +0000 | |||
162 | +++ buildout.cfg 2009-03-23 16:14:28 +0000 | |||
163 | @@ -2,6 +2,7 @@ | |||
164 | 2 | parts = | 2 | parts = |
165 | 3 | interpreter | 3 | interpreter |
166 | 4 | test | 4 | test |
167 | 5 | docs | ||
168 | 5 | tags | 6 | tags |
169 | 6 | unzip = true | 7 | unzip = true |
170 | 7 | 8 | ||
171 | @@ -10,7 +11,14 @@ | |||
172 | 10 | [test] | 11 | [test] |
173 | 11 | recipe = zc.recipe.testrunner | 12 | recipe = zc.recipe.testrunner |
174 | 12 | eggs = lazr.batchnavigator | 13 | eggs = lazr.batchnavigator |
176 | 13 | defaults = '--tests-pattern ^tests --exit-with-status'.split() | 14 | defaults = '--tests-pattern ^tests --exit-with-status --suite-name additional_tests'.split() |
177 | 15 | |||
178 | 16 | [docs] | ||
179 | 17 | recipe = z3c.recipe.sphinxdoc | ||
180 | 18 | eggs = lazr.batchnavigator [docs] | ||
181 | 19 | index-doc = README | ||
182 | 20 | default.css = | ||
183 | 21 | layout.html = | ||
184 | 14 | 22 | ||
185 | 15 | [interpreter] | 23 | [interpreter] |
186 | 16 | recipe = zc.recipe.egg | 24 | recipe = zc.recipe.egg |
187 | 17 | 25 | ||
188 | === added file 'ez_setup.py' | |||
189 | --- ez_setup.py 1970-01-01 00:00:00 +0000 | |||
190 | +++ ez_setup.py 2009-03-23 16:14:28 +0000 | |||
191 | @@ -0,0 +1,241 @@ | |||
192 | 1 | #!python | ||
193 | 2 | """Bootstrap setuptools installation | ||
194 | 3 | |||
195 | 4 | If you want to use setuptools in your package's setup.py, just include this | ||
196 | 5 | file in the same directory with it, and add this to the top of your setup.py:: | ||
197 | 6 | |||
198 | 7 | from ez_setup import use_setuptools | ||
199 | 8 | use_setuptools() | ||
200 | 9 | |||
201 | 10 | If you want to require a specific version of setuptools, set a download | ||
202 | 11 | mirror, or use an alternate download directory, you can do so by supplying | ||
203 | 12 | the appropriate options to ``use_setuptools()``. | ||
204 | 13 | |||
205 | 14 | This file can also be run as a script to install or upgrade setuptools. | ||
206 | 15 | """ | ||
207 | 16 | import sys | ||
208 | 17 | DEFAULT_VERSION = "0.6c8" | ||
209 | 18 | DEFAULT_URL = "http://pypi.python.org/packages/%s/s/setuptools/" % sys.version[:3] | ||
210 | 19 | |||
211 | 20 | md5_data = { | ||
212 | 21 | 'setuptools-0.6b1-py2.3.egg': '8822caf901250d848b996b7f25c6e6ca', | ||
213 | 22 | 'setuptools-0.6b1-py2.4.egg': 'b79a8a403e4502fbb85ee3f1941735cb', | ||
214 | 23 | 'setuptools-0.6b2-py2.3.egg': '5657759d8a6d8fc44070a9d07272d99b', | ||
215 | 24 | 'setuptools-0.6b2-py2.4.egg': '4996a8d169d2be661fa32a6e52e4f82a', | ||
216 | 25 | 'setuptools-0.6b3-py2.3.egg': 'bb31c0fc7399a63579975cad9f5a0618', | ||
217 | 26 | 'setuptools-0.6b3-py2.4.egg': '38a8c6b3d6ecd22247f179f7da669fac', | ||
218 | 27 | 'setuptools-0.6b4-py2.3.egg': '62045a24ed4e1ebc77fe039aa4e6f7e5', | ||
219 | 28 | 'setuptools-0.6b4-py2.4.egg': '4cb2a185d228dacffb2d17f103b3b1c4', | ||
220 | 29 | 'setuptools-0.6c1-py2.3.egg': 'b3f2b5539d65cb7f74ad79127f1a908c', | ||
221 | 30 | 'setuptools-0.6c1-py2.4.egg': 'b45adeda0667d2d2ffe14009364f2a4b', | ||
222 | 31 | 'setuptools-0.6c2-py2.3.egg': 'f0064bf6aa2b7d0f3ba0b43f20817c27', | ||
223 | 32 | 'setuptools-0.6c2-py2.4.egg': '616192eec35f47e8ea16cd6a122b7277', | ||
224 | 33 | 'setuptools-0.6c3-py2.3.egg': 'f181fa125dfe85a259c9cd6f1d7b78fa', | ||
225 | 34 | 'setuptools-0.6c3-py2.4.egg': 'e0ed74682c998bfb73bf803a50e7b71e', | ||
226 | 35 | 'setuptools-0.6c3-py2.5.egg': 'abef16fdd61955514841c7c6bd98965e', | ||
227 | 36 | 'setuptools-0.6c4-py2.3.egg': 'b0b9131acab32022bfac7f44c5d7971f', | ||
228 | 37 | 'setuptools-0.6c4-py2.4.egg': '2a1f9656d4fbf3c97bf946c0a124e6e2', | ||
229 | 38 | 'setuptools-0.6c4-py2.5.egg': '8f5a052e32cdb9c72bcf4b5526f28afc', | ||
230 | 39 | 'setuptools-0.6c5-py2.3.egg': 'ee9fd80965da04f2f3e6b3576e9d8167', | ||
231 | 40 | 'setuptools-0.6c5-py2.4.egg': 'afe2adf1c01701ee841761f5bcd8aa64', | ||
232 | 41 | 'setuptools-0.6c5-py2.5.egg': 'a8d3f61494ccaa8714dfed37bccd3d5d', | ||
233 | 42 | 'setuptools-0.6c6-py2.3.egg': '35686b78116a668847237b69d549ec20', | ||
234 | 43 | 'setuptools-0.6c6-py2.4.egg': '3c56af57be3225019260a644430065ab', | ||
235 | 44 | 'setuptools-0.6c6-py2.5.egg': 'b2f8a7520709a5b34f80946de5f02f53', | ||
236 | 45 | 'setuptools-0.6c7-py2.3.egg': '209fdf9adc3a615e5115b725658e13e2', | ||
237 | 46 | 'setuptools-0.6c7-py2.4.egg': '5a8f954807d46a0fb67cf1f26c55a82e', | ||
238 | 47 | 'setuptools-0.6c7-py2.5.egg': '45d2ad28f9750e7434111fde831e8372', | ||
239 | 48 | 'setuptools-0.6c8-py2.3.egg': '50759d29b349db8cfd807ba8303f1902', | ||
240 | 49 | 'setuptools-0.6c8-py2.4.egg': 'cba38d74f7d483c06e9daa6070cce6de', | ||
241 | 50 | 'setuptools-0.6c8-py2.5.egg': '1721747ee329dc150590a58b3e1ac95b', | ||
242 | 51 | } | ||
243 | 52 | |||
244 | 53 | import sys, os | ||
245 | 54 | |||
246 | 55 | def _validate_md5(egg_name, data): | ||
247 | 56 | if egg_name in md5_data: | ||
248 | 57 | from md5 import md5 | ||
249 | 58 | digest = md5(data).hexdigest() | ||
250 | 59 | if digest != md5_data[egg_name]: | ||
251 | 60 | print >>sys.stderr, ( | ||
252 | 61 | "md5 validation of %s failed! (Possible download problem?)" | ||
253 | 62 | % egg_name | ||
254 | 63 | ) | ||
255 | 64 | sys.exit(2) | ||
256 | 65 | return data | ||
257 | 66 | |||
258 | 67 | |||
259 | 68 | def use_setuptools( | ||
260 | 69 | version=DEFAULT_VERSION, download_base=DEFAULT_URL, to_dir=os.curdir, | ||
261 | 70 | download_delay=15, min_version=None | ||
262 | 71 | ): | ||
263 | 72 | """Automatically find/download setuptools and make it available on sys.path | ||
264 | 73 | |||
265 | 74 | `version` should be a valid setuptools version number that is available | ||
266 | 75 | as an egg for download under the `download_base` URL (which should end with | ||
267 | 76 | a '/'). `to_dir` is the directory where setuptools will be downloaded, if | ||
268 | 77 | it is not already available. If `download_delay` is specified, it should | ||
269 | 78 | be the number of seconds that will be paused before initiating a download, | ||
270 | 79 | should one be required. If an older version of setuptools is installed, | ||
271 | 80 | this routine will print a message to ``sys.stderr`` and raise SystemExit in | ||
272 | 81 | an attempt to abort the calling script. | ||
273 | 82 | """ | ||
274 | 83 | # Work around a hack in the ez_setup.py file from simplejson==1.7.3. | ||
275 | 84 | if min_version: | ||
276 | 85 | version = min_version | ||
277 | 86 | |||
278 | 87 | was_imported = 'pkg_resources' in sys.modules or 'setuptools' in sys.modules | ||
279 | 88 | def do_download(): | ||
280 | 89 | egg = download_setuptools(version, download_base, to_dir, download_delay) | ||
281 | 90 | sys.path.insert(0, egg) | ||
282 | 91 | import setuptools; setuptools.bootstrap_install_from = egg | ||
283 | 92 | try: | ||
284 | 93 | import pkg_resources | ||
285 | 94 | except ImportError: | ||
286 | 95 | return do_download() | ||
287 | 96 | try: | ||
288 | 97 | pkg_resources.require("setuptools>="+version); return | ||
289 | 98 | except pkg_resources.VersionConflict, e: | ||
290 | 99 | if was_imported: | ||
291 | 100 | print >>sys.stderr, ( | ||
292 | 101 | "The required version of setuptools (>=%s) is not available, and\n" | ||
293 | 102 | "can't be installed while this script is running. Please install\n" | ||
294 | 103 | " a more recent version first, using 'easy_install -U setuptools'." | ||
295 | 104 | "\n\n(Currently using %r)" | ||
296 | 105 | ) % (version, e.args[0]) | ||
297 | 106 | sys.exit(2) | ||
298 | 107 | else: | ||
299 | 108 | del pkg_resources, sys.modules['pkg_resources'] # reload ok | ||
300 | 109 | return do_download() | ||
301 | 110 | except pkg_resources.DistributionNotFound: | ||
302 | 111 | return do_download() | ||
303 | 112 | |||
304 | 113 | def download_setuptools( | ||
305 | 114 | version=DEFAULT_VERSION, download_base=DEFAULT_URL, to_dir=os.curdir, | ||
306 | 115 | delay = 15 | ||
307 | 116 | ): | ||
308 | 117 | """Download setuptools from a specified location and return its filename | ||
309 | 118 | |||
310 | 119 | `version` should be a valid setuptools version number that is available | ||
311 | 120 | as an egg for download under the `download_base` URL (which should end | ||
312 | 121 | with a '/'). `to_dir` is the directory where the egg will be downloaded. | ||
313 | 122 | `delay` is the number of seconds to pause before an actual download attempt. | ||
314 | 123 | """ | ||
315 | 124 | import urllib2, shutil | ||
316 | 125 | egg_name = "setuptools-%s-py%s.egg" % (version,sys.version[:3]) | ||
317 | 126 | url = download_base + egg_name | ||
318 | 127 | saveto = os.path.join(to_dir, egg_name) | ||
319 | 128 | src = dst = None | ||
320 | 129 | if not os.path.exists(saveto): # Avoid repeated downloads | ||
321 | 130 | try: | ||
322 | 131 | from distutils import log | ||
323 | 132 | if delay: | ||
324 | 133 | log.warn(""" | ||
325 | 134 | --------------------------------------------------------------------------- | ||
326 | 135 | This script requires setuptools version %s to run (even to display | ||
327 | 136 | help). I will attempt to download it for you (from | ||
328 | 137 | %s), but | ||
329 | 138 | you may need to enable firewall access for this script first. | ||
330 | 139 | I will start the download in %d seconds. | ||
331 | 140 | |||
332 | 141 | (Note: if this machine does not have network access, please obtain the file | ||
333 | 142 | |||
334 | 143 | %s | ||
335 | 144 | |||
336 | 145 | and place it in this directory before rerunning this script.) | ||
337 | 146 | ---------------------------------------------------------------------------""", | ||
338 | 147 | version, download_base, delay, url | ||
339 | 148 | ); from time import sleep; sleep(delay) | ||
340 | 149 | log.warn("Downloading %s", url) | ||
341 | 150 | src = urllib2.urlopen(url) | ||
342 | 151 | # Read/write all in one block, so we don't create a corrupt file | ||
343 | 152 | # if the download is interrupted. | ||
344 | 153 | data = _validate_md5(egg_name, src.read()) | ||
345 | 154 | dst = open(saveto,"wb"); dst.write(data) | ||
346 | 155 | finally: | ||
347 | 156 | if src: src.close() | ||
348 | 157 | if dst: dst.close() | ||
349 | 158 | return os.path.realpath(saveto) | ||
350 | 159 | |||
351 | 160 | def main(argv, version=DEFAULT_VERSION): | ||
352 | 161 | """Install or upgrade setuptools and EasyInstall""" | ||
353 | 162 | try: | ||
354 | 163 | import setuptools | ||
355 | 164 | except ImportError: | ||
356 | 165 | egg = None | ||
357 | 166 | try: | ||
358 | 167 | egg = download_setuptools(version, delay=0) | ||
359 | 168 | sys.path.insert(0,egg) | ||
360 | 169 | from setuptools.command.easy_install import main | ||
361 | 170 | return main(list(argv)+[egg]) # we're done here | ||
362 | 171 | finally: | ||
363 | 172 | if egg and os.path.exists(egg): | ||
364 | 173 | os.unlink(egg) | ||
365 | 174 | else: | ||
366 | 175 | if setuptools.__version__ == '0.0.1': | ||
367 | 176 | print >>sys.stderr, ( | ||
368 | 177 | "You have an obsolete version of setuptools installed. Please\n" | ||
369 | 178 | "remove it from your system entirely before rerunning this script." | ||
370 | 179 | ) | ||
371 | 180 | sys.exit(2) | ||
372 | 181 | |||
373 | 182 | req = "setuptools>="+version | ||
374 | 183 | import pkg_resources | ||
375 | 184 | try: | ||
376 | 185 | pkg_resources.require(req) | ||
377 | 186 | except pkg_resources.VersionConflict: | ||
378 | 187 | try: | ||
379 | 188 | from setuptools.command.easy_install import main | ||
380 | 189 | except ImportError: | ||
381 | 190 | from easy_install import main | ||
382 | 191 | main(list(argv)+[download_setuptools(delay=0)]) | ||
383 | 192 | sys.exit(0) # try to force an exit | ||
384 | 193 | else: | ||
385 | 194 | if argv: | ||
386 | 195 | from setuptools.command.easy_install import main | ||
387 | 196 | main(argv) | ||
388 | 197 | else: | ||
389 | 198 | print "Setuptools version",version,"or greater has been installed." | ||
390 | 199 | print '(Run "ez_setup.py -U setuptools" to reinstall or upgrade.)' | ||
391 | 200 | |||
392 | 201 | def update_md5(filenames): | ||
393 | 202 | """Update our built-in md5 registry""" | ||
394 | 203 | |||
395 | 204 | import re | ||
396 | 205 | from md5 import md5 | ||
397 | 206 | |||
398 | 207 | for name in filenames: | ||
399 | 208 | base = os.path.basename(name) | ||
400 | 209 | f = open(name,'rb') | ||
401 | 210 | md5_data[base] = md5(f.read()).hexdigest() | ||
402 | 211 | f.close() | ||
403 | 212 | |||
404 | 213 | data = [" %r: %r,\n" % it for it in md5_data.items()] | ||
405 | 214 | data.sort() | ||
406 | 215 | repl = "".join(data) | ||
407 | 216 | |||
408 | 217 | import inspect | ||
409 | 218 | srcfile = inspect.getsourcefile(sys.modules[__name__]) | ||
410 | 219 | f = open(srcfile, 'rb'); src = f.read(); f.close() | ||
411 | 220 | |||
412 | 221 | match = re.search("\nmd5_data = {\n([^}]+)}", src) | ||
413 | 222 | if not match: | ||
414 | 223 | print >>sys.stderr, "Internal error!" | ||
415 | 224 | sys.exit(2) | ||
416 | 225 | |||
417 | 226 | src = src[:match.start(1)] + repl + src[match.end(1):] | ||
418 | 227 | f = open(srcfile,'w') | ||
419 | 228 | f.write(src) | ||
420 | 229 | f.close() | ||
421 | 230 | |||
422 | 231 | |||
423 | 232 | if __name__=='__main__': | ||
424 | 233 | if len(sys.argv)>2 and sys.argv[1]=='--md5update': | ||
425 | 234 | update_md5(sys.argv[2:]) | ||
426 | 235 | else: | ||
427 | 236 | main(sys.argv[1:]) | ||
428 | 237 | |||
429 | 238 | |||
430 | 239 | |||
431 | 240 | |||
432 | 241 | |||
433 | 0 | 242 | ||
434 | === modified file 'setup.py' (properties changed: -x to +x) | |||
435 | --- setup.py 2009-03-05 23:19:16 +0000 | |||
436 | +++ setup.py 2009-03-23 16:14:28 +0000 | |||
437 | @@ -1,19 +1,23 @@ | |||
438 | 1 | #!/usr/bin/env python | ||
439 | 2 | |||
440 | 1 | # Copyright 2009 Canonical Ltd. All rights reserved. | 3 | # Copyright 2009 Canonical Ltd. All rights reserved. |
441 | 2 | # | 4 | # |
442 | 3 | # This file is part of lazr.batchnavigator | 5 | # This file is part of lazr.batchnavigator |
443 | 4 | # | 6 | # |
448 | 5 | # lazr.batchnavigator is free software: you can redistribute it and/or modify it | 7 | # lazr.batchnavigator is free software: you can redistribute it and/or modify |
449 | 6 | # under the terms of the GNU Lesser General Public License as published by | 8 | # it under the terms of the GNU Lesser General Public License as published by |
450 | 7 | # the Free Software Foundation, either version 3 of the License, or (at your | 9 | # the Free Software Foundation, version 3 of the License. |
447 | 8 | # option) any later version. | ||
451 | 9 | # | 10 | # |
455 | 10 | # lazr.batchnavigator is distributed in the hope that it will be useful, but WITHOUT | 11 | # lazr.batchnavigator is distributed in the hope that it will be useful, but |
456 | 11 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 12 | # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY |
457 | 12 | # FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 13 | # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public |
458 | 13 | # License for more details. | 14 | # License for more details. |
459 | 14 | # | 15 | # |
460 | 15 | # You should have received a copy of the GNU Lesser General Public License | 16 | # You should have received a copy of the GNU Lesser General Public License |
462 | 16 | # along with lazr.batchnavigator. If not, see <http://www.gnu.org/licenses/>. | 17 | # along with lazr.batchnavigator. If not, see <http://www.gnu.org/licenses/>. |
463 | 18 | |||
464 | 19 | import ez_setup | ||
465 | 20 | ez_setup.use_setuptools() | ||
466 | 17 | 21 | ||
467 | 18 | import sys | 22 | import sys |
468 | 19 | from setuptools import setup, find_packages | 23 | from setuptools import setup, find_packages |
469 | @@ -32,7 +36,8 @@ | |||
470 | 32 | return '\n'.join(res) | 36 | return '\n'.join(res) |
471 | 33 | # end generic helpers | 37 | # end generic helpers |
472 | 34 | 38 | ||
474 | 35 | __version__ = '0.1' | 39 | sys.path.insert(0, 'src') |
475 | 40 | from lazr.batchnavigator import __version__ | ||
476 | 36 | 41 | ||
477 | 37 | setup( | 42 | setup( |
478 | 38 | name='lazr.batchnavigator', | 43 | name='lazr.batchnavigator', |
479 | @@ -56,10 +61,17 @@ | |||
480 | 56 | 'zope.publisher', | 61 | 'zope.publisher', |
481 | 57 | ], | 62 | ], |
482 | 58 | url='https://launchpad.net/lazr.batchnavigator', | 63 | url='https://launchpad.net/lazr.batchnavigator', |
483 | 64 | download_url= 'https://launchpad.net/lazr.batchnavigator/+download', | ||
484 | 59 | classifiers=[ | 65 | classifiers=[ |
485 | 60 | "Development Status :: 5 - Production/Stable", | 66 | "Development Status :: 5 - Production/Stable", |
486 | 61 | "Intended Audience :: Developers", | 67 | "Intended Audience :: Developers", |
487 | 62 | "License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)", | 68 | "License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)", |
488 | 63 | "Operating System :: OS Independent", | 69 | "Operating System :: OS Independent", |
489 | 64 | "Programming Language :: Python"], | 70 | "Programming Language :: Python"], |
490 | 71 | extras_require=dict( | ||
491 | 72 | docs=['Sphinx', | ||
492 | 73 | 'z3c.recipe.sphinxdoc'] | ||
493 | 74 | ), | ||
494 | 75 | setup_requires=['eggtestinfo', 'setuptools_bzr'], | ||
495 | 76 | test_suite='lazr.yourpkg.tests', | ||
496 | 65 | ) | 77 | ) |
497 | 66 | 78 | ||
498 | === modified file 'src/lazr/__init__.py' | |||
499 | --- src/lazr/__init__.py 2009-03-03 19:43:53 +0000 | |||
500 | +++ src/lazr/__init__.py 2009-03-23 16:14:28 +0000 | |||
501 | @@ -2,18 +2,17 @@ | |||
502 | 2 | # | 2 | # |
503 | 3 | # This file is part of lazr.batchnavigator. | 3 | # This file is part of lazr.batchnavigator. |
504 | 4 | # | 4 | # |
509 | 5 | # lazr.batchnavigator is free software: you can redistribute it and/or modify it | 5 | # lazr.batchnavigator is free software: you can redistribute it and/or modify |
510 | 6 | # under the terms of the GNU Lesser General Public License as published by | 6 | # it under the terms of the GNU Lesser General Public License as published by |
511 | 7 | # the Free Software Foundation, either version 3 of the License, or (at your | 7 | # the Free Software Foundation, version 3 of the License. |
508 | 8 | # option) any later version. | ||
512 | 9 | # | 8 | # |
516 | 10 | # lazr.batchnavigator is distributed in the hope that it will be useful, but WITHOUT | 9 | # lazr.batchnavigator is distributed in the hope that it will be useful, but |
517 | 11 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 10 | # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY |
518 | 12 | # FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 11 | # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public |
519 | 13 | # License for more details. | 12 | # License for more details. |
520 | 14 | # | 13 | # |
521 | 15 | # You should have received a copy of the GNU Lesser General Public License | 14 | # You should have received a copy of the GNU Lesser General Public License |
523 | 16 | # along with lazr.batchnavigator. If not, see <http://www.gnu.org/licenses/>. | 15 | # along with lazr.batchnavigator. If not, see <http://www.gnu.org/licenses/>. |
524 | 17 | 16 | ||
525 | 18 | # this is a namespace package | 17 | # this is a namespace package |
526 | 19 | try: | 18 | try: |
527 | 20 | 19 | ||
528 | === modified file 'src/lazr/batchnavigator/NEWS.txt' | |||
529 | --- src/lazr/batchnavigator/NEWS.txt 2009-03-03 19:43:53 +0000 | |||
530 | +++ src/lazr/batchnavigator/NEWS.txt 2009-03-24 15:57:40 +0000 | |||
531 | @@ -1,8 +1,8 @@ | |||
533 | 1 | ===================== | 1 | ============================ |
534 | 2 | NEWS for lazr.batchnavigator | 2 | NEWS for lazr.batchnavigator |
536 | 3 | ===================== | 3 | ============================ |
537 | 4 | 4 | ||
539 | 5 | 1.0 (200X-XX-XX) | 5 | 1.0 (2009-03-24) |
540 | 6 | ================ | 6 | ================ |
541 | 7 | 7 | ||
543 | 8 | - Initial release | 8 | - Initial release on PyPI |
544 | 9 | 9 | ||
545 | === modified file 'src/lazr/batchnavigator/README.txt' | |||
546 | --- src/lazr/batchnavigator/README.txt 2009-03-05 23:19:16 +0000 | |||
547 | +++ src/lazr/batchnavigator/README.txt 2009-03-23 16:14:28 +0000 | |||
548 | @@ -1,18 +1,18 @@ | |||
549 | 1 | .. | 1 | .. |
550 | 2 | This file is part of lazr.batchnavigator. | 2 | This file is part of lazr.batchnavigator. |
551 | 3 | 3 | ||
556 | 4 | lazr.batchnavigator is free software: you can redistribute it and/or modify | 4 | lazr.batchnavigator is free software: you can redistribute it and/or |
557 | 5 | it under the terms of the GNU Lesser General Public License as published by | 5 | modify it under the terms of the GNU Lesser General Public License as |
558 | 6 | the Free Software Foundation, either version 3 of the License, or (at your | 6 | published by the Free Software Foundation, version 3 of the License. |
555 | 7 | option) any later version. | ||
559 | 8 | 7 | ||
560 | 9 | lazr.batchnavigator is distributed in the hope that it will be useful, but | 8 | lazr.batchnavigator is distributed in the hope that it will be useful, but |
561 | 10 | WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY | 9 | WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY |
563 | 11 | or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 10 | or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public |
564 | 12 | License for more details. | 11 | License for more details. |
565 | 13 | 12 | ||
566 | 14 | You should have received a copy of the GNU Lesser General Public License | 13 | You should have received a copy of the GNU Lesser General Public License |
568 | 15 | along with lazr.batchnavigator. If not, see <http://www.gnu.org/licenses/>. | 14 | along with lazr.batchnavigator. If not, see |
569 | 15 | <http://www.gnu.org/licenses/>. | ||
570 | 16 | 16 | ||
571 | 17 | Batch Navigation | 17 | Batch Navigation |
572 | 18 | **************** | 18 | **************** |
573 | @@ -40,7 +40,7 @@ | |||
574 | 40 | >>> from zope.component import getSiteManager | 40 | >>> from zope.component import getSiteManager |
575 | 41 | >>> sm = getSiteManager() | 41 | >>> sm = getSiteManager() |
576 | 42 | >>> sm.registerAdapter(HTTPCharsets) | 42 | >>> sm.registerAdapter(HTTPCharsets) |
578 | 43 | 43 | ||
579 | 44 | >>> def build_request(query_string_args=None, method='GET'): | 44 | >>> def build_request(query_string_args=None, method='GET'): |
580 | 45 | ... if query_string_args is None: | 45 | ... if query_string_args is None: |
581 | 46 | ... query_string = '' | 46 | ... query_string = '' |
582 | @@ -119,7 +119,7 @@ | |||
583 | 119 | 119 | ||
584 | 120 | >>> last_reindeer_batch_navigator.firstBatchURL() | 120 | >>> last_reindeer_batch_navigator.firstBatchURL() |
585 | 121 | 'http://www.example.com/foo?start=0&batch=3' | 121 | 'http://www.example.com/foo?start=0&batch=3' |
587 | 122 | 122 | ||
588 | 123 | >>> last_reindeer_batch_navigator.prevBatchURL() | 123 | >>> last_reindeer_batch_navigator.prevBatchURL() |
589 | 124 | 'http://www.example.com/foo?start=0&batch=3' | 124 | 'http://www.example.com/foo?start=0&batch=3' |
590 | 125 | 125 | ||
591 | @@ -176,7 +176,7 @@ | |||
592 | 176 | ... 'batch': '3'}, method='POST') | 176 | ... 'batch': '3'}, method='POST') |
593 | 177 | >>> reindeer_batch_navigator_post_with_qs = BatchNavigator( | 177 | >>> reindeer_batch_navigator_post_with_qs = BatchNavigator( |
594 | 178 | ... reindeer, request) | 178 | ... reindeer, request) |
596 | 179 | 179 | ||
597 | 180 | >>> reindeer_batch_navigator_post_with_qs.start | 180 | >>> reindeer_batch_navigator_post_with_qs.start |
598 | 181 | 3 | 181 | 3 |
599 | 182 | >>> reindeer_batch_navigator_post_with_qs.nextBatchURL() | 182 | >>> reindeer_batch_navigator_post_with_qs.nextBatchURL() |
600 | @@ -207,7 +207,7 @@ | |||
601 | 207 | '' | 207 | '' |
602 | 208 | >>> null_batch_navigator.lastBatchURL() | 208 | >>> null_batch_navigator.lastBatchURL() |
603 | 209 | '' | 209 | '' |
605 | 210 | 210 | ||
606 | 211 | >>> null_batch_navigator = BatchNavigator( | 211 | >>> null_batch_navigator = BatchNavigator( |
607 | 212 | ... [], build_request(), size=3) | 212 | ... [], build_request(), size=3) |
608 | 213 | >>> null_batch_navigator.firstBatchURL() | 213 | >>> null_batch_navigator.firstBatchURL() |
609 | @@ -242,7 +242,7 @@ | |||
610 | 242 | ... def __init__(self, results): | 242 | ... def __init__(self, results): |
611 | 243 | ... self.stub_results = results | 243 | ... self.stub_results = results |
612 | 244 | ... def count(self): | 244 | ... def count(self): |
614 | 245 | ... # imagine this actually returned | 245 | ... # imagine this actually returned |
615 | 246 | ... return len(self.stub_results) | 246 | ... return len(self.stub_results) |
616 | 247 | ... def __getitem__(self, ix): | 247 | ... def __getitem__(self, ix): |
617 | 248 | ... return self.stub_results[ix] # also works with slices | 248 | ... return self.stub_results[ix] # also works with slices |
618 | @@ -300,7 +300,7 @@ | |||
619 | 300 | and it is undesirable or overly expensive to execute the query for | 300 | and it is undesirable or overly expensive to execute the query for |
620 | 301 | every value in the entire result set. | 301 | every value in the entire result set. |
621 | 302 | 302 | ||
623 | 303 | The callback function must define two parameters. The first is the | 303 | The callback function must define two parameters. The first is the |
624 | 304 | batch navigator object itself, and the second it the current batch. | 304 | batch navigator object itself, and the second it the current batch. |
625 | 305 | The callback function is called once and only once when the | 305 | The callback function is called once and only once when the |
626 | 306 | BatchNavigator is constructed, and the current batch is determined. | 306 | BatchNavigator is constructed, and the current batch is determined. |
627 | @@ -308,13 +308,13 @@ | |||
628 | 308 | >>> def print_callback(context, batch): | 308 | >>> def print_callback(context, batch): |
629 | 309 | ... for item in batch: | 309 | ... for item in batch: |
630 | 310 | ... print item | 310 | ... print item |
632 | 311 | 311 | ||
633 | 312 | >>> reindeer_batch_navigator = BatchNavigator( | 312 | >>> reindeer_batch_navigator = BatchNavigator( |
634 | 313 | ... reindeer, build_request(), size=3, callback=print_callback) | 313 | ... reindeer, build_request(), size=3, callback=print_callback) |
635 | 314 | Dasher | 314 | Dasher |
636 | 315 | Dancer | 315 | Dancer |
637 | 316 | Prancer | 316 | Prancer |
639 | 317 | 317 | ||
640 | 318 | >>> request = build_request({"start": "3", "batch": "20"}) | 318 | >>> request = build_request({"start": "3", "batch": "20"}) |
641 | 319 | >>> last_reindeer_batch_navigator = BatchNavigator( | 319 | >>> last_reindeer_batch_navigator = BatchNavigator( |
642 | 320 | ... reindeer, request=request, callback=print_callback) | 320 | ... reindeer, request=request, callback=print_callback) |
643 | @@ -339,7 +339,7 @@ | |||
644 | 339 | ... return BatchNavigator( | 339 | ... return BatchNavigator( |
645 | 340 | ... reindeer, build_request(), size=3, | 340 | ... reindeer, build_request(), size=3, |
646 | 341 | ... callback=self.constructReindeerFromAtoms) | 341 | ... callback=self.constructReindeerFromAtoms) |
648 | 342 | 342 | ||
649 | 343 | >>> view = ReindeerView() | 343 | >>> view = ReindeerView() |
650 | 344 | >>> batch_navigator = view.batchedReindeer() | 344 | >>> batch_navigator = view.batchedReindeer() |
651 | 345 | >>> print view.built_reindeer | 345 | >>> print view.built_reindeer |
652 | @@ -441,4 +441,14 @@ | |||
653 | 441 | >>> sm.unregisterAdapter(HTTPCharsets) | 441 | >>> sm.unregisterAdapter(HTTPCharsets) |
654 | 442 | True | 442 | True |
655 | 443 | >>> sm.unregisterAdapter(ExampleAdapter) | 443 | >>> sm.unregisterAdapter(ExampleAdapter) |
656 | 444 | True | ||
657 | 445 | \ No newline at end of file | 444 | \ No newline at end of file |
658 | 445 | True | ||
659 | 446 | |||
660 | 447 | =============== | ||
661 | 448 | Other Documents | ||
662 | 449 | =============== | ||
663 | 450 | |||
664 | 451 | .. toctree:: | ||
665 | 452 | :glob: | ||
666 | 453 | |||
667 | 454 | * | ||
668 | 455 | docs/* | ||
669 | 446 | 456 | ||
670 | === added file 'src/lazr/batchnavigator/__init__.py' | |||
671 | --- src/lazr/batchnavigator/__init__.py 1970-01-01 00:00:00 +0000 | |||
672 | +++ src/lazr/batchnavigator/__init__.py 2009-03-23 16:14:28 +0000 | |||
673 | @@ -0,0 +1,30 @@ | |||
674 | 1 | # Copyright 2004-2009 Canonical Ltd. All rights reserved. | ||
675 | 2 | # | ||
676 | 3 | # This file is part of lazr.batchnavigator | ||
677 | 4 | # | ||
678 | 5 | # lazr.batchnavigator is free software: you can redistribute it and/or modify | ||
679 | 6 | # it under the terms of the GNU Lesser General Public License as published by | ||
680 | 7 | # the Free Software Foundation, version 3 of the License. | ||
681 | 8 | # | ||
682 | 9 | # lazr.batchnavigator is distributed in the hope that it will be useful, but | ||
683 | 10 | # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY | ||
684 | 11 | # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | ||
685 | 12 | # License for more details. | ||
686 | 13 | # | ||
687 | 14 | # You should have received a copy of the GNU Lesser General Public License | ||
688 | 15 | # along with lazr.batchnavigator. If not, see <http://www.gnu.org/licenses/>. | ||
689 | 16 | |||
690 | 17 | """Functions for working with generic syntax URIs.""" | ||
691 | 18 | |||
692 | 19 | __version__ = 1.0 | ||
693 | 20 | |||
694 | 21 | # Re-export in such a way that __version__ can still be imported if | ||
695 | 22 | # dependencies are not yet available. | ||
696 | 23 | try: | ||
697 | 24 | # While we generally frown on "*" imports, this, combined with the fact we | ||
698 | 25 | # only test code from this module, means that we can verify what has been | ||
699 | 26 | # exported. | ||
700 | 27 | from lazr.batchnavigator._batchnavigator import * | ||
701 | 28 | from lazr.batchnavigator._batchnavigator import __all__ | ||
702 | 29 | except ImportError: | ||
703 | 30 | pass | ||
704 | 0 | 31 | ||
705 | === renamed file 'src/lazr/batchnavigator/__init__.py' => 'src/lazr/batchnavigator/_batchnavigator.py' | |||
706 | --- src/lazr/batchnavigator/__init__.py 2009-03-05 23:29:09 +0000 | |||
707 | +++ src/lazr/batchnavigator/_batchnavigator.py 2009-03-23 16:14:28 +0000 | |||
708 | @@ -2,18 +2,17 @@ | |||
709 | 2 | # | 2 | # |
710 | 3 | # This file is part of lazr.batchnavigator | 3 | # This file is part of lazr.batchnavigator |
711 | 4 | # | 4 | # |
716 | 5 | # lazr.batchnavigator is free software: you can redistribute it and/or modify it | 5 | # lazr.batchnavigator is free software: you can redistribute it and/or modify |
717 | 6 | # under the terms of the GNU Lesser General Public License as published by | 6 | # it under the terms of the GNU Lesser General Public License as published by |
718 | 7 | # the Free Software Foundation, either version 3 of the License, or (at your | 7 | # the Free Software Foundation, version 3 of the License. |
715 | 8 | # option) any later version. | ||
719 | 9 | # | 8 | # |
723 | 10 | # lazr.batchnavigator is distributed in the hope that it will be useful, but WITHOUT | 9 | # lazr.batchnavigator is distributed in the hope that it will be useful, but |
724 | 11 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 10 | # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY |
725 | 12 | # FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 11 | # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public |
726 | 13 | # License for more details. | 12 | # License for more details. |
727 | 14 | # | 13 | # |
728 | 15 | # You should have received a copy of the GNU Lesser General Public License | 14 | # You should have received a copy of the GNU Lesser General Public License |
730 | 16 | # along with lazr.batchnavigator. If not, see <http://www.gnu.org/licenses/>. | 15 | # along with lazr.batchnavigator. If not, see <http://www.gnu.org/licenses/>. |
731 | 17 | 16 | ||
732 | 18 | __metaclass__ = type | 17 | __metaclass__ = type |
733 | 19 | 18 | ||
734 | @@ -27,6 +26,7 @@ | |||
735 | 27 | from lazr.batchnavigator.interfaces import ( | 26 | from lazr.batchnavigator.interfaces import ( |
736 | 28 | IBatchNavigator, InvalidBatchSizeError, IBatchNavigatorFactory) | 27 | IBatchNavigator, InvalidBatchSizeError, IBatchNavigatorFactory) |
737 | 29 | 28 | ||
738 | 29 | __all__ = ['BatchNavigator'] | ||
739 | 30 | 30 | ||
740 | 31 | class BatchNavigator: | 31 | class BatchNavigator: |
741 | 32 | 32 | ||
742 | @@ -57,7 +57,7 @@ | |||
743 | 57 | @Lazy | 57 | @Lazy |
744 | 58 | def query_string_parameters(self): | 58 | def query_string_parameters(self): |
745 | 59 | query_string = self.request.get('QUERY_STRING', '') | 59 | query_string = self.request.get('QUERY_STRING', '') |
747 | 60 | 60 | ||
748 | 61 | # Just in case QUERY_STRING is in the environment explicitly as | 61 | # Just in case QUERY_STRING is in the environment explicitly as |
749 | 62 | # None (Some tests seem to do this, but not sure if it can ever | 62 | # None (Some tests seem to do this, but not sure if it can ever |
750 | 63 | # happen outside of tests.) | 63 | # happen outside of tests.) |
751 | @@ -259,4 +259,3 @@ | |||
752 | 259 | 259 | ||
753 | 260 | def currentBatch(self): | 260 | def currentBatch(self): |
754 | 261 | return self.batch | 261 | return self.batch |
755 | 262 | |||
756 | 263 | 262 | ||
757 | === modified file 'src/lazr/batchnavigator/interfaces.py' | |||
758 | --- src/lazr/batchnavigator/interfaces.py 2009-03-05 23:29:09 +0000 | |||
759 | +++ src/lazr/batchnavigator/interfaces.py 2009-03-23 16:14:28 +0000 | |||
760 | @@ -2,18 +2,17 @@ | |||
761 | 2 | # | 2 | # |
762 | 3 | # This file is part of lazr.batchnavigator | 3 | # This file is part of lazr.batchnavigator |
763 | 4 | # | 4 | # |
768 | 5 | # lazr.batchnavigator is free software: you can redistribute it and/or modify it | 5 | # lazr.batchnavigator is free software: you can redistribute it and/or modify |
769 | 6 | # under the terms of the GNU Lesser General Public License as published by | 6 | # it under the terms of the GNU Lesser General Public License as published by |
770 | 7 | # the Free Software Foundation, either version 3 of the License, or (at your | 7 | # the Free Software Foundation, version 3 of the License. |
767 | 8 | # option) any later version. | ||
771 | 9 | # | 8 | # |
775 | 10 | # lazr.batchnavigator is distributed in the hope that it will be useful, but WITHOUT | 9 | # lazr.batchnavigator is distributed in the hope that it will be useful, but |
776 | 11 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 10 | # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY |
777 | 12 | # FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | 11 | # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public |
778 | 13 | # License for more details. | 12 | # License for more details. |
779 | 14 | # | 13 | # |
780 | 15 | # You should have received a copy of the GNU Lesser General Public License | 14 | # You should have received a copy of the GNU Lesser General Public License |
782 | 16 | # along with lazr.batchnavigator. If not, see <http://www.gnu.org/licenses/>. | 15 | # along with lazr.batchnavigator. If not, see <http://www.gnu.org/licenses/>. |
783 | 17 | 16 | ||
784 | 18 | from zope.interface import Interface, Attribute | 17 | from zope.interface import Interface, Attribute |
785 | 19 | 18 | ||
786 | 20 | 19 | ||
787 | === modified file 'src/lazr/batchnavigator/tests/__init__.py' | |||
788 | --- src/lazr/batchnavigator/tests/__init__.py 2009-01-09 02:10:26 +0000 | |||
789 | +++ src/lazr/batchnavigator/tests/__init__.py 2009-03-23 16:14:28 +0000 | |||
790 | @@ -0,0 +1,16 @@ | |||
791 | 1 | # Copyright 2009 Canonical Ltd. All rights reserved. | ||
792 | 2 | # | ||
793 | 3 | # This file is part of lazr.batchnavigator | ||
794 | 4 | # | ||
795 | 5 | # lazr.batchnavigator is free software: you can redistribute it and/or modify | ||
796 | 6 | # it under the terms of the GNU Lesser General Public License as published by | ||
797 | 7 | # the Free Software Foundation, version 3 of the License. | ||
798 | 8 | # | ||
799 | 9 | # lazr.batchnavigator is distributed in the hope that it will be useful, but | ||
800 | 10 | # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY | ||
801 | 11 | # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | ||
802 | 12 | # License for more details. | ||
803 | 13 | # | ||
804 | 14 | # You should have received a copy of the GNU Lesser General Public License | ||
805 | 15 | # along with lazr.batchnavigator. If not, see <http://www.gnu.org/licenses/>. | ||
806 | 16 | "The lazr.batchnavigator tests." | ||
807 | 0 | 17 | ||
808 | === renamed file 'src/lazr/batchnavigator/tests/test_documentation.py' => 'src/lazr/batchnavigator/tests/test_docs.py' | |||
809 | --- src/lazr/batchnavigator/tests/test_documentation.py 2009-03-04 16:27:16 +0000 | |||
810 | +++ src/lazr/batchnavigator/tests/test_docs.py 2009-03-23 16:14:28 +0000 | |||
811 | @@ -1,14 +1,29 @@ | |||
812 | 1 | # Copyright 2009 Canonical Ltd. All rights reserved. | 1 | # Copyright 2009 Canonical Ltd. All rights reserved. |
815 | 2 | 2 | # | |
816 | 3 | """Test harness.""" | 3 | # This file is part of lazr.batchnavigator |
817 | 4 | # | ||
818 | 5 | # lazr.batchnavigator is free software: you can redistribute it and/or modify | ||
819 | 6 | # it under the terms of the GNU Lesser General Public License as published by | ||
820 | 7 | # the Free Software Foundation, version 3 of the License. | ||
821 | 8 | # | ||
822 | 9 | # lazr.batchnavigator is distributed in the hope that it will be useful, but | ||
823 | 10 | # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY | ||
824 | 11 | # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | ||
825 | 12 | # License for more details. | ||
826 | 13 | # | ||
827 | 14 | # You should have received a copy of the GNU Lesser General Public License | ||
828 | 15 | # along with lazr.batchnavigator. If not, see <http://www.gnu.org/licenses/>. | ||
829 | 16 | "Test harness for doctests." | ||
830 | 4 | 17 | ||
831 | 5 | __metaclass__ = type | 18 | __metaclass__ = type |
832 | 6 | __all__ = [ | 19 | __all__ = [ |
834 | 7 | 'test_suite', | 20 | 'additional_tests', |
835 | 8 | ] | 21 | ] |
836 | 9 | 22 | ||
837 | 23 | import atexit | ||
838 | 24 | import doctest | ||
839 | 10 | import os | 25 | import os |
841 | 11 | import doctest | 26 | import pkg_resources |
842 | 12 | import unittest | 27 | import unittest |
843 | 13 | 28 | ||
844 | 14 | DOCTEST_FLAGS = ( | 29 | DOCTEST_FLAGS = ( |
845 | @@ -16,12 +31,20 @@ | |||
846 | 16 | doctest.NORMALIZE_WHITESPACE | | 31 | doctest.NORMALIZE_WHITESPACE | |
847 | 17 | doctest.REPORT_NDIFF) | 32 | doctest.REPORT_NDIFF) |
848 | 18 | 33 | ||
851 | 19 | def test_suite(): | 34 | |
852 | 20 | readme = os.path.normpath( | 35 | def additional_tests(): |
853 | 36 | "Run the doc tests (README.txt and docs/*, if any exist)" | ||
854 | 37 | doctest_files = [ | ||
855 | 21 | os.path.abspath( | 38 | os.path.abspath( |
859 | 22 | os.path.join(os.path.dirname(__file__), | 39 | pkg_resources.resource_filename('lazr.batchnavigator', 'README.txt'))] |
860 | 23 | os.path.pardir, | 40 | if pkg_resources.resource_exists('lazr.batchnavigator', 'docs'): |
861 | 24 | 'README.txt'))) | 41 | for name in pkg_resources.resource_listdir('lazr.batchnavigator', 'docs'): |
862 | 42 | if name.endswith('.txt'): | ||
863 | 43 | doctest_files.append( | ||
864 | 44 | os.path.abspath( | ||
865 | 45 | pkg_resources.resource_filename( | ||
866 | 46 | 'lazr.batchnavigator', 'docs/%s' % name))) | ||
867 | 47 | kwargs = dict(module_relative=False, optionflags=DOCTEST_FLAGS) | ||
868 | 48 | atexit.register(pkg_resources.cleanup_resources) | ||
869 | 25 | return unittest.TestSuite(( | 49 | return unittest.TestSuite(( |
872 | 26 | doctest.DocFileSuite( | 50 | doctest.DocFileSuite(*doctest_files, **kwargs))) |
871 | 27 | readme, module_relative=False, optionflags=DOCTEST_FLAGS))) | ||
873 | 28 | 51 | ||
874 | === modified file 'src/lazr/batchnavigator/tests/test_z3batching.py' | |||
875 | --- src/lazr/batchnavigator/tests/test_z3batching.py 2009-03-03 18:02:58 +0000 | |||
876 | +++ src/lazr/batchnavigator/tests/test_z3batching.py 2009-03-23 16:14:28 +0000 | |||
877 | @@ -199,10 +199,7 @@ | |||
878 | 199 | self.assertEqual(batch.endNumber(), 100) | 199 | self.assertEqual(batch.endNumber(), 100) |
879 | 200 | 200 | ||
880 | 201 | 201 | ||
882 | 202 | def test_suite(): | 202 | def additional_tests(): |
883 | 203 | return unittest.TestSuite(( | 203 | return unittest.TestSuite(( |
884 | 204 | unittest.makeSuite(BatchTest), | 204 | unittest.makeSuite(BatchTest), |
885 | 205 | )) | 205 | )) |
886 | 206 | |||
887 | 207 | if __name__ == '__main__': | ||
888 | 208 | unittest.main() | ||
889 | 209 | 206 | ||
890 | === added file 'src/lazr/batchnavigator/z3batching/COPYRIGHT.txt' | |||
891 | --- src/lazr/batchnavigator/z3batching/COPYRIGHT.txt 1970-01-01 00:00:00 +0000 | |||
892 | +++ src/lazr/batchnavigator/z3batching/COPYRIGHT.txt 2009-03-24 15:07:42 +0000 | |||
893 | @@ -0,0 +1,9 @@ | |||
894 | 1 | Copyright (c) 2004-2009 Zope Corporation and Contributors, and Canonical Ltd. | ||
895 | 2 | All Rights Reserved. | ||
896 | 3 | |||
897 | 4 | This software is subject to the provisions of the Zope Public License, | ||
898 | 5 | Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. | ||
899 | 6 | THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED | ||
900 | 7 | WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
901 | 8 | WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS | ||
902 | 9 | FOR A PARTICULAR PURPOSE. | ||
903 | 0 | 10 | ||
904 | === added file 'src/lazr/batchnavigator/z3batching/LICENSE.txt' | |||
905 | --- src/lazr/batchnavigator/z3batching/LICENSE.txt 1970-01-01 00:00:00 +0000 | |||
906 | +++ src/lazr/batchnavigator/z3batching/LICENSE.txt 2009-03-24 15:07:42 +0000 | |||
907 | @@ -0,0 +1,54 @@ | |||
908 | 1 | Zope Public License (ZPL) Version 2.1 | ||
909 | 2 | ------------------------------------- | ||
910 | 3 | |||
911 | 4 | A copyright notice accompanies this license document that | ||
912 | 5 | identifies the copyright holders. | ||
913 | 6 | |||
914 | 7 | This license has been certified as open source. It has also | ||
915 | 8 | been designated as GPL compatible by the Free Software | ||
916 | 9 | Foundation (FSF). | ||
917 | 10 | |||
918 | 11 | Redistribution and use in source and binary forms, with or | ||
919 | 12 | without modification, are permitted provided that the | ||
920 | 13 | following conditions are met: | ||
921 | 14 | |||
922 | 15 | 1. Redistributions in source code must retain the | ||
923 | 16 | accompanying copyright notice, this list of conditions, | ||
924 | 17 | and the following disclaimer. | ||
925 | 18 | |||
926 | 19 | 2. Redistributions in binary form must reproduce the accompanying | ||
927 | 20 | copyright notice, this list of conditions, and the | ||
928 | 21 | following disclaimer in the documentation and/or other | ||
929 | 22 | materials provided with the distribution. | ||
930 | 23 | |||
931 | 24 | 3. Names of the copyright holders must not be used to | ||
932 | 25 | endorse or promote products derived from this software | ||
933 | 26 | without prior written permission from the copyright | ||
934 | 27 | holders. | ||
935 | 28 | |||
936 | 29 | 4. The right to distribute this software or to use it for | ||
937 | 30 | any purpose does not give you the right to use | ||
938 | 31 | Servicemarks (sm) or Trademarks (tm) of the copyright | ||
939 | 32 | holders. Use of them is covered by separate agreement | ||
940 | 33 | with the copyright holders. | ||
941 | 34 | |||
942 | 35 | 5. If any files are modified, you must cause the modified | ||
943 | 36 | files to carry prominent notices stating that you changed | ||
944 | 37 | the files and the date of any change. | ||
945 | 38 | |||
946 | 39 | Disclaimer | ||
947 | 40 | |||
948 | 41 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' | ||
949 | 42 | AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT | ||
950 | 43 | NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY | ||
951 | 44 | AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN | ||
952 | 45 | NO EVENT SHALL THE COPYRIGHT HOLDERS BE | ||
953 | 46 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
954 | 47 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
955 | 48 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
956 | 49 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
957 | 50 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||
958 | 51 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE | ||
959 | 52 | OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
960 | 53 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH | ||
961 | 54 | DAMAGE. | ||
962 | 0 | \ No newline at end of file | 55 | \ No newline at end of file |
963 | 1 | 56 | ||
964 | === added file 'src/lazr/batchnavigator/z3batching/README.txt' | |||
965 | --- src/lazr/batchnavigator/z3batching/README.txt 1970-01-01 00:00:00 +0000 | |||
966 | +++ src/lazr/batchnavigator/z3batching/README.txt 2009-03-24 15:07:42 +0000 | |||
967 | @@ -0,0 +1,5 @@ | |||
968 | 1 | This code is a very old fork of batching code from the Zope project. The | ||
969 | 2 | z3c.batching package (http://pypi.python.org/pypi/z3c.batching) appears to | ||
970 | 3 | have evolved from the same, or very similar, source. Ideally, we will be able | ||
971 | 4 | to change lazr.batchnavigator to depend on z3c.batching, perhaps contributing | ||
972 | 5 | to that package any necessary changes for our usage needs. |
The same changes as for the other lazr packages:
- license specifies v3 of LGPL
- buildout updates
Thanks
Gary