Merge lp:~gary/lazr.config/build-license-changes into lp:~launchpad-pqm/lazr.config/devel
- build-license-changes
- Merge into devel
Proposed by
Gary Poster
Status: | Merged |
---|---|
Merged at revision: | not available |
Proposed branch: | lp:~gary/lazr.config/build-license-changes |
Merge into: | lp:~launchpad-pqm/lazr.config/devel |
Diff against target: | None lines |
To merge this branch: | bzr merge lp:~gary/lazr.config/build-license-changes |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
LAZR Developers | Pending | ||
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 : | # |
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file '.bzrignore' | |||
2 | --- .bzrignore 2008-12-15 22:22:12 +0000 | |||
3 | +++ .bzrignore 2009-03-24 17:31:47 +0000 | |||
4 | @@ -1,8 +1,11 @@ | |||
5 | 1 | TEST_THIS_REST_BEFORE_REGISTERING.txt | ||
6 | 2 | bin | 1 | bin |
7 | 3 | develop-eggs | 2 | develop-eggs |
9 | 4 | eggs | 3 | .installed.cfg |
10 | 4 | develop-eggs | ||
11 | 5 | parts | 5 | parts |
14 | 6 | src/*.egg-info | 6 | *.egg-info |
15 | 7 | .installed.cfg | 7 | tags |
16 | 8 | TAGS | ||
17 | 9 | build | ||
18 | 10 | *.egg | ||
19 | 8 | dist | 11 | dist |
20 | 9 | 12 | ||
21 | === modified file 'CHANGES.txt' | |||
22 | --- CHANGES.txt 2008-12-19 19:36:16 +0000 | |||
23 | +++ CHANGES.txt 2009-03-24 17:31:47 +0000 | |||
24 | @@ -5,8 +5,7 @@ | |||
25 | 5 | 5 | ||
26 | 6 | lazr.config is free software: you can redistribute it and/or modify it | 6 | lazr.config is free software: you can redistribute it and/or modify it |
27 | 7 | under the terms of the GNU Lesser General Public License as published by | 7 | under the terms of the GNU Lesser General Public License as published by |
30 | 8 | the Free Software Foundation, either version 3 of the License, or (at your | 8 | the Free Software Foundation, version 3 of the License. |
29 | 9 | option) any later version. | ||
31 | 10 | 9 | ||
32 | 11 | lazr.config is distributed in the hope that it will be useful, but WITHOUT | 10 | lazr.config is distributed in the hope that it will be useful, but WITHOUT |
33 | 12 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 11 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
34 | 13 | 12 | ||
35 | === renamed file 'DEVELOP.txt' => 'HACKING.txt' | |||
36 | --- DEVELOP.txt 2008-12-19 19:36:16 +0000 | |||
37 | +++ HACKING.txt 2009-03-24 17:31:47 +0000 | |||
38 | @@ -3,8 +3,7 @@ | |||
39 | 3 | 3 | ||
40 | 4 | lazr.config is free software: you can redistribute it and/or modify it | 4 | lazr.config is free software: you can redistribute it and/or modify it |
41 | 5 | under the terms of the GNU Lesser General Public License as published by | 5 | under the terms of the GNU Lesser General Public License as published by |
44 | 6 | the Free Software Foundation, either version 3 of the License, or (at your | 6 | the Free Software Foundation, version 3 of the License. |
43 | 7 | option) any later version. | ||
45 | 8 | 7 | ||
46 | 9 | lazr.config is distributed in the hope that it will be useful, but WITHOUT | 8 | lazr.config is distributed in the hope that it will be useful, but WITHOUT |
47 | 10 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 9 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
48 | @@ -16,141 +15,27 @@ | |||
49 | 16 | 15 | ||
50 | 17 | This project uses zc.buildout for development. | 16 | This project uses zc.buildout for development. |
51 | 18 | 17 | ||
133 | 19 | Basics | 18 | ============ |
134 | 20 | ====== | 19 | Introduction |
135 | 21 | 20 | ============ | |
136 | 22 | To develop or run tests, first run ``$DESIRED_PYTHON bootstrap.py`` in this | 21 | |
137 | 23 | directory, where you replace ``$DESIRED_PYTHON`` with the python that should | 22 | These are guidelines for hacking on the lazr.config project. But first, |
138 | 24 | be used to build and run this project. A non-system Python is highly | 23 | please see the common hacking guidelines at: |
139 | 25 | recommended, but not required. | 24 | |
140 | 26 | 25 | http://dev.launchpad.net/Hacking | |
141 | 27 | Then run ``./bin/buildout``. (NOTE: Ubuntu Intrepid users, see bottom of this | 26 | |
142 | 28 | document if this generates errors.) | 27 | |
143 | 29 | 28 | Getting help | |
63 | 30 | You can now run tests with ``./bin/test``. Use ``./bin/test --help`` to read | ||
64 | 31 | about the many options. | ||
65 | 32 | |||
66 | 33 | To gain access to a Python interpreter with the package and its dependent eggs | ||
67 | 34 | available, use ``./bin/py``. | ||
68 | 35 | |||
69 | 36 | You can generate ctags and idutils files for a variety of editors using | ||
70 | 37 | ``./bin/tags`` (see ``./bin/tags --help``). The advantage of the files | ||
71 | 38 | generated from this utility is that they include the sourcecode from the eggs | ||
72 | 39 | used in this buildout. | ||
73 | 40 | |||
74 | 41 | To generate distributions, use ``./bin/buildout setup . SETUP_CMD [...]``. | ||
75 | 42 | That is, you can use ``./bin/buildout setup .`` as if it were | ||
76 | 43 | ``python setup.py``. The intended advantage is easy access to a pristine, | ||
77 | 44 | local version of setuptools. | ||
78 | 45 | |||
79 | 46 | Global Cache | ||
80 | 47 | ============ | ||
81 | 48 | |||
82 | 49 | Every project using zc.buildout will keep its own collection of eggs by | ||
83 | 50 | default. You may want to cache these eggs, and their downloaded | ||
84 | 51 | distributions, globally. To do so, perform the following instructions. | ||
85 | 52 | |||
86 | 53 | - ``mkdir -p ~/.buildout/eggs`` | ||
87 | 54 | - ``mkdir ~/.buildout/download-cache`` | ||
88 | 55 | - Create ``~/.buildout/default.cfg`` with the following content, replacing | ||
89 | 56 | "$HOME" with the path to your home:: | ||
90 | 57 | |||
91 | 58 | [buildout] | ||
92 | 59 | eggs-directory=$HOME/.buildout/eggs | ||
93 | 60 | download-cache=$HOME/.buildout/download-cache | ||
94 | 61 | |||
95 | 62 | Working with Unreleased Packages | ||
96 | 63 | ================================ | ||
97 | 64 | |||
98 | 65 | You may want to develop with an unreleased distribution of another package. | ||
99 | 66 | To do so, you have many options. Here are three. | ||
100 | 67 | |||
101 | 68 | Source | ||
102 | 69 | ------ | ||
103 | 70 | |||
104 | 71 | If you have a source package, you can add it to this buildout (temporarily or, | ||
105 | 72 | if really appropriate, permanently) as follows. | ||
106 | 73 | |||
107 | 74 | NOTE: We'll use "this software" to refer to the software/buildout to which you | ||
108 | 75 | want to add a source package; and "the other software" to refer to the source | ||
109 | 76 | package that you want to add. | ||
110 | 77 | |||
111 | 78 | - Add the top-level directory (the one with the setup.py) of the other | ||
112 | 79 | software to somewhere accessible to this software. You might use ``bzr | ||
113 | 80 | add``, symbolic links, svn externals, or whatever the appropriate tool is | ||
114 | 81 | for the situation. A reasonable option is to add it in the top-level | ||
115 | 82 | directory of this software. | ||
116 | 83 | - In this software's buildout.cfg, in the [buildout] section, look for a | ||
117 | 84 | ``develop`` key. It will probably look like this: ``develop = .``. | ||
118 | 85 | Edit it to include the directory of the other software. For instance, if | ||
119 | 86 | you added it at the top level of this software's tree in a folder called | ||
120 | 87 | "lazr_foo," you would change the line in buildout.cfg to read | ||
121 | 88 | ``develop = . lazr_foo``. | ||
122 | 89 | - Rerun ``bin/buildout``. | ||
123 | 90 | |||
124 | 91 | Barring version conflicts in your setup.py or buildout configuration (which | ||
125 | 92 | will be reported as errors when you run `bin/buildout``), you should now be | ||
126 | 93 | using the source version of the dependency. Look at one of the scripts in | ||
127 | 94 | ``bin``, such as ``bin/test`` to verify, if you like. | ||
128 | 95 | |||
129 | 96 | To undo, remove the line in buildout.conf, remove the other software's | ||
130 | 97 | directory if necessary for cleanliness, and rerun ``bin/buildout``. | ||
131 | 98 | |||
132 | 99 | Distribution | ||
144 | 100 | ------------ | 29 | ------------ |
145 | 101 | 30 | ||
201 | 102 | If you have a source distribution or an egg, and you set up the download-cache | 31 | If you find bugs in this package, you can report them here: |
202 | 103 | as described in the `Global Cache`_ section above, you can put the | 32 | |
203 | 104 | distribution (sdist or egg) in the download-cache's ``dist`` directory. | 33 | https://launchpad.net/lazr.config |
204 | 105 | Then rerun bin/buildout. | 34 | |
205 | 106 | 35 | If you want to discuss this package, join the team and mailing list here: | |
206 | 107 | Alternatively, if you have an egg, you can put it in your eggs directory, or | 36 | |
207 | 108 | in the shared eggs directory as described in the `Global Cache`_ section, if | 37 | https://launchpad.net/~lazr-developers |
208 | 109 | you are using that. The rerun bin/buildout. | 38 | |
209 | 110 | 39 | or send a message to: | |
210 | 111 | In both cases, to undo, you must remove the egg from the local or shared | 40 | |
211 | 112 | ``eggs`` directory. If you used the ``download-cache/dist`` directory, you | 41 | lazr-developers@lists.launchpad.net |
157 | 113 | must also remove it from there. | ||
158 | 114 | |||
159 | 115 | Private Source | ||
160 | 116 | -------------- | ||
161 | 117 | |||
162 | 118 | If you want to distribute a source distribution privately, see | ||
163 | 119 | http://pypi.python.org/pypi/zc.buildoutsftp/. | ||
164 | 120 | |||
165 | 121 | References | ||
166 | 122 | ========== | ||
167 | 123 | |||
168 | 124 | There is much, much more to learn about zc.buildout. It works well for small | ||
169 | 125 | packages, but is even better for big projects. For more information about | ||
170 | 126 | zc.buildout: | ||
171 | 127 | |||
172 | 128 | - http://grok.zope.org/documentation/tutorial/introduction-to-zc.buildout | ||
173 | 129 | |||
174 | 130 | Presentation notes of an introduction to zc.buildout by its author, Jim | ||
175 | 131 | Fulton. | ||
176 | 132 | |||
177 | 133 | - http://pypi.python.org/pypi/zc.buildout | ||
178 | 134 | |||
179 | 135 | The user manual. | ||
180 | 136 | |||
181 | 137 | Ubunutu Intrepid Problem | ||
182 | 138 | ======================== | ||
183 | 139 | |||
184 | 140 | Intrepid has a bug working with buildout. You may have to hack to fix it. | ||
185 | 141 | Here's an example of the Python 2.4 version of the hack. | ||
186 | 142 | |||
187 | 143 | $ sudo rm /usr/lib/python2.4/site-packages/GMenuSimpleEditor/*.py | ||
188 | 144 | $ sudo ln | ||
189 | 145 | -s /var/lib/python-support/python2.4/GMenuSimpleEditor/*.py /usr/lib/python2.4/site-packages/GMenuSimpleEditor/ | ||
190 | 146 | |||
191 | 147 | Python 2.5 would need the same kind of fix (replace all three instances of | ||
192 | 148 | "python2.4" with "python2.5" in the above). | ||
193 | 149 | |||
194 | 150 | The author of this document tried an Intrepid upgrade and an aptitude | ||
195 | 151 | reinstall of python-gmenu to no avail before doing the rough-and-tumble change | ||
196 | 152 | described above. | ||
197 | 153 | |||
198 | 154 | See | ||
199 | 155 | https://bugs.edge.launchpad.net/ubuntu/+source/gnome-menus/+bug/301571 and the | ||
200 | 156 | bug linked to it by datakid. | ||
212 | 157 | 42 | ||
213 | === modified file 'MANIFEST.in' | |||
214 | --- MANIFEST.in 2008-12-15 22:22:12 +0000 | |||
215 | +++ MANIFEST.in 2009-03-24 17:31:47 +0000 | |||
216 | @@ -1,2 +1,2 @@ | |||
219 | 1 | include *.txt MANIFEST.in | 1 | exclude MANIFEST.in buildout.cfg bootstrap.py .bzrignore |
220 | 2 | recursive-include src *.txt *.py *.conf | 2 | prune _bootstrap |
221 | 3 | 3 | ||
222 | === modified file 'README.txt' | |||
223 | --- README.txt 2008-12-19 19:36:16 +0000 | |||
224 | +++ README.txt 2009-03-24 17:31:47 +0000 | |||
225 | @@ -5,8 +5,7 @@ | |||
226 | 5 | 5 | ||
227 | 6 | lazr.config is free software: you can redistribute it and/or modify it | 6 | lazr.config is free software: you can redistribute it and/or modify it |
228 | 7 | under the terms of the GNU Lesser General Public License as published by | 7 | under the terms of the GNU Lesser General Public License as published by |
231 | 8 | the Free Software Foundation, either version 3 of the License, or (at your | 8 | the Free Software Foundation, version 3 of the License. |
230 | 9 | option) any later version. | ||
232 | 10 | 9 | ||
233 | 11 | lazr.config is distributed in the hope that it will be useful, but WITHOUT | 10 | lazr.config is distributed in the hope that it will be useful, but WITHOUT |
234 | 12 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 11 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
235 | 13 | 12 | ||
236 | === added directory '_bootstrap' | |||
237 | === added file '_bootstrap/COPYRIGHT.txt' | |||
238 | --- _bootstrap/COPYRIGHT.txt 1970-01-01 00:00:00 +0000 | |||
239 | +++ _bootstrap/COPYRIGHT.txt 2009-03-24 17:31:47 +0000 | |||
240 | @@ -0,0 +1,9 @@ | |||
241 | 1 | Copyright (c) 2004-2009 Zope Corporation and Contributors. | ||
242 | 2 | All Rights Reserved. | ||
243 | 3 | |||
244 | 4 | This software is subject to the provisions of the Zope Public License, | ||
245 | 5 | Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. | ||
246 | 6 | THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED | ||
247 | 7 | WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
248 | 8 | WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS | ||
249 | 9 | FOR A PARTICULAR PURPOSE. | ||
250 | 0 | 10 | ||
251 | === added file '_bootstrap/LICENSE.txt' | |||
252 | --- _bootstrap/LICENSE.txt 1970-01-01 00:00:00 +0000 | |||
253 | +++ _bootstrap/LICENSE.txt 2009-03-24 17:31:47 +0000 | |||
254 | @@ -0,0 +1,54 @@ | |||
255 | 1 | Zope Public License (ZPL) Version 2.1 | ||
256 | 2 | ------------------------------------- | ||
257 | 3 | |||
258 | 4 | A copyright notice accompanies this license document that | ||
259 | 5 | identifies the copyright holders. | ||
260 | 6 | |||
261 | 7 | This license has been certified as open source. It has also | ||
262 | 8 | been designated as GPL compatible by the Free Software | ||
263 | 9 | Foundation (FSF). | ||
264 | 10 | |||
265 | 11 | Redistribution and use in source and binary forms, with or | ||
266 | 12 | without modification, are permitted provided that the | ||
267 | 13 | following conditions are met: | ||
268 | 14 | |||
269 | 15 | 1. Redistributions in source code must retain the | ||
270 | 16 | accompanying copyright notice, this list of conditions, | ||
271 | 17 | and the following disclaimer. | ||
272 | 18 | |||
273 | 19 | 2. Redistributions in binary form must reproduce the accompanying | ||
274 | 20 | copyright notice, this list of conditions, and the | ||
275 | 21 | following disclaimer in the documentation and/or other | ||
276 | 22 | materials provided with the distribution. | ||
277 | 23 | |||
278 | 24 | 3. Names of the copyright holders must not be used to | ||
279 | 25 | endorse or promote products derived from this software | ||
280 | 26 | without prior written permission from the copyright | ||
281 | 27 | holders. | ||
282 | 28 | |||
283 | 29 | 4. The right to distribute this software or to use it for | ||
284 | 30 | any purpose does not give you the right to use | ||
285 | 31 | Servicemarks (sm) or Trademarks (tm) of the copyright | ||
286 | 32 | holders. Use of them is covered by separate agreement | ||
287 | 33 | with the copyright holders. | ||
288 | 34 | |||
289 | 35 | 5. If any files are modified, you must cause the modified | ||
290 | 36 | files to carry prominent notices stating that you changed | ||
291 | 37 | the files and the date of any change. | ||
292 | 38 | |||
293 | 39 | Disclaimer | ||
294 | 40 | |||
295 | 41 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' | ||
296 | 42 | AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT | ||
297 | 43 | NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY | ||
298 | 44 | AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN | ||
299 | 45 | NO EVENT SHALL THE COPYRIGHT HOLDERS BE | ||
300 | 46 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
301 | 47 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
302 | 48 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
303 | 49 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
304 | 50 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||
305 | 51 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE | ||
306 | 52 | OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
307 | 53 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH | ||
308 | 54 | DAMAGE. | ||
309 | 0 | \ No newline at end of file | 55 | \ No newline at end of file |
310 | 1 | 56 | ||
311 | === renamed file 'bootstrap.py' => '_bootstrap/bootstrap.py' | |||
312 | === added symlink 'bootstrap.py' | |||
313 | === target is '_bootstrap/bootstrap.py' | |||
314 | === modified file 'buildout.cfg' | |||
315 | --- buildout.cfg 2008-12-15 22:22:12 +0000 | |||
316 | +++ buildout.cfg 2009-03-24 17:36:13 +0000 | |||
317 | @@ -2,6 +2,7 @@ | |||
318 | 2 | parts = | 2 | parts = |
319 | 3 | interpreter | 3 | interpreter |
320 | 4 | test | 4 | test |
321 | 5 | docs | ||
322 | 5 | tags | 6 | tags |
323 | 6 | unzip = true | 7 | unzip = true |
324 | 7 | 8 | ||
325 | @@ -10,7 +11,14 @@ | |||
326 | 10 | [test] | 11 | [test] |
327 | 11 | recipe = zc.recipe.testrunner | 12 | recipe = zc.recipe.testrunner |
328 | 12 | eggs = lazr.config | 13 | eggs = lazr.config |
330 | 13 | defaults = '--tests-pattern ^tests --exit-with-status'.split() | 14 | defaults = '--tests-pattern ^tests --exit-with-status --suite-name additional_tests'.split() |
331 | 15 | |||
332 | 16 | [docs] | ||
333 | 17 | recipe = z3c.recipe.sphinxdoc | ||
334 | 18 | eggs = lazr.config [docs] | ||
335 | 19 | index-doc = README | ||
336 | 20 | default.css = | ||
337 | 21 | layout.html = | ||
338 | 14 | 22 | ||
339 | 15 | [interpreter] | 23 | [interpreter] |
340 | 16 | recipe = zc.recipe.egg | 24 | recipe = zc.recipe.egg |
341 | 17 | 25 | ||
342 | === added file 'ez_setup.py' | |||
343 | --- ez_setup.py 1970-01-01 00:00:00 +0000 | |||
344 | +++ ez_setup.py 2009-03-24 17:31:47 +0000 | |||
345 | @@ -0,0 +1,241 @@ | |||
346 | 1 | #!python | ||
347 | 2 | """Bootstrap setuptools installation | ||
348 | 3 | |||
349 | 4 | If you want to use setuptools in your package's setup.py, just include this | ||
350 | 5 | file in the same directory with it, and add this to the top of your setup.py:: | ||
351 | 6 | |||
352 | 7 | from ez_setup import use_setuptools | ||
353 | 8 | use_setuptools() | ||
354 | 9 | |||
355 | 10 | If you want to require a specific version of setuptools, set a download | ||
356 | 11 | mirror, or use an alternate download directory, you can do so by supplying | ||
357 | 12 | the appropriate options to ``use_setuptools()``. | ||
358 | 13 | |||
359 | 14 | This file can also be run as a script to install or upgrade setuptools. | ||
360 | 15 | """ | ||
361 | 16 | import sys | ||
362 | 17 | DEFAULT_VERSION = "0.6c8" | ||
363 | 18 | DEFAULT_URL = "http://pypi.python.org/packages/%s/s/setuptools/" % sys.version[:3] | ||
364 | 19 | |||
365 | 20 | md5_data = { | ||
366 | 21 | 'setuptools-0.6b1-py2.3.egg': '8822caf901250d848b996b7f25c6e6ca', | ||
367 | 22 | 'setuptools-0.6b1-py2.4.egg': 'b79a8a403e4502fbb85ee3f1941735cb', | ||
368 | 23 | 'setuptools-0.6b2-py2.3.egg': '5657759d8a6d8fc44070a9d07272d99b', | ||
369 | 24 | 'setuptools-0.6b2-py2.4.egg': '4996a8d169d2be661fa32a6e52e4f82a', | ||
370 | 25 | 'setuptools-0.6b3-py2.3.egg': 'bb31c0fc7399a63579975cad9f5a0618', | ||
371 | 26 | 'setuptools-0.6b3-py2.4.egg': '38a8c6b3d6ecd22247f179f7da669fac', | ||
372 | 27 | 'setuptools-0.6b4-py2.3.egg': '62045a24ed4e1ebc77fe039aa4e6f7e5', | ||
373 | 28 | 'setuptools-0.6b4-py2.4.egg': '4cb2a185d228dacffb2d17f103b3b1c4', | ||
374 | 29 | 'setuptools-0.6c1-py2.3.egg': 'b3f2b5539d65cb7f74ad79127f1a908c', | ||
375 | 30 | 'setuptools-0.6c1-py2.4.egg': 'b45adeda0667d2d2ffe14009364f2a4b', | ||
376 | 31 | 'setuptools-0.6c2-py2.3.egg': 'f0064bf6aa2b7d0f3ba0b43f20817c27', | ||
377 | 32 | 'setuptools-0.6c2-py2.4.egg': '616192eec35f47e8ea16cd6a122b7277', | ||
378 | 33 | 'setuptools-0.6c3-py2.3.egg': 'f181fa125dfe85a259c9cd6f1d7b78fa', | ||
379 | 34 | 'setuptools-0.6c3-py2.4.egg': 'e0ed74682c998bfb73bf803a50e7b71e', | ||
380 | 35 | 'setuptools-0.6c3-py2.5.egg': 'abef16fdd61955514841c7c6bd98965e', | ||
381 | 36 | 'setuptools-0.6c4-py2.3.egg': 'b0b9131acab32022bfac7f44c5d7971f', | ||
382 | 37 | 'setuptools-0.6c4-py2.4.egg': '2a1f9656d4fbf3c97bf946c0a124e6e2', | ||
383 | 38 | 'setuptools-0.6c4-py2.5.egg': '8f5a052e32cdb9c72bcf4b5526f28afc', | ||
384 | 39 | 'setuptools-0.6c5-py2.3.egg': 'ee9fd80965da04f2f3e6b3576e9d8167', | ||
385 | 40 | 'setuptools-0.6c5-py2.4.egg': 'afe2adf1c01701ee841761f5bcd8aa64', | ||
386 | 41 | 'setuptools-0.6c5-py2.5.egg': 'a8d3f61494ccaa8714dfed37bccd3d5d', | ||
387 | 42 | 'setuptools-0.6c6-py2.3.egg': '35686b78116a668847237b69d549ec20', | ||
388 | 43 | 'setuptools-0.6c6-py2.4.egg': '3c56af57be3225019260a644430065ab', | ||
389 | 44 | 'setuptools-0.6c6-py2.5.egg': 'b2f8a7520709a5b34f80946de5f02f53', | ||
390 | 45 | 'setuptools-0.6c7-py2.3.egg': '209fdf9adc3a615e5115b725658e13e2', | ||
391 | 46 | 'setuptools-0.6c7-py2.4.egg': '5a8f954807d46a0fb67cf1f26c55a82e', | ||
392 | 47 | 'setuptools-0.6c7-py2.5.egg': '45d2ad28f9750e7434111fde831e8372', | ||
393 | 48 | 'setuptools-0.6c8-py2.3.egg': '50759d29b349db8cfd807ba8303f1902', | ||
394 | 49 | 'setuptools-0.6c8-py2.4.egg': 'cba38d74f7d483c06e9daa6070cce6de', | ||
395 | 50 | 'setuptools-0.6c8-py2.5.egg': '1721747ee329dc150590a58b3e1ac95b', | ||
396 | 51 | } | ||
397 | 52 | |||
398 | 53 | import sys, os | ||
399 | 54 | |||
400 | 55 | def _validate_md5(egg_name, data): | ||
401 | 56 | if egg_name in md5_data: | ||
402 | 57 | from md5 import md5 | ||
403 | 58 | digest = md5(data).hexdigest() | ||
404 | 59 | if digest != md5_data[egg_name]: | ||
405 | 60 | print >>sys.stderr, ( | ||
406 | 61 | "md5 validation of %s failed! (Possible download problem?)" | ||
407 | 62 | % egg_name | ||
408 | 63 | ) | ||
409 | 64 | sys.exit(2) | ||
410 | 65 | return data | ||
411 | 66 | |||
412 | 67 | |||
413 | 68 | def use_setuptools( | ||
414 | 69 | version=DEFAULT_VERSION, download_base=DEFAULT_URL, to_dir=os.curdir, | ||
415 | 70 | download_delay=15, min_version=None | ||
416 | 71 | ): | ||
417 | 72 | """Automatically find/download setuptools and make it available on sys.path | ||
418 | 73 | |||
419 | 74 | `version` should be a valid setuptools version number that is available | ||
420 | 75 | as an egg for download under the `download_base` URL (which should end with | ||
421 | 76 | a '/'). `to_dir` is the directory where setuptools will be downloaded, if | ||
422 | 77 | it is not already available. If `download_delay` is specified, it should | ||
423 | 78 | be the number of seconds that will be paused before initiating a download, | ||
424 | 79 | should one be required. If an older version of setuptools is installed, | ||
425 | 80 | this routine will print a message to ``sys.stderr`` and raise SystemExit in | ||
426 | 81 | an attempt to abort the calling script. | ||
427 | 82 | """ | ||
428 | 83 | # Work around a hack in the ez_setup.py file from simplejson==1.7.3. | ||
429 | 84 | if min_version: | ||
430 | 85 | version = min_version | ||
431 | 86 | |||
432 | 87 | was_imported = 'pkg_resources' in sys.modules or 'setuptools' in sys.modules | ||
433 | 88 | def do_download(): | ||
434 | 89 | egg = download_setuptools(version, download_base, to_dir, download_delay) | ||
435 | 90 | sys.path.insert(0, egg) | ||
436 | 91 | import setuptools; setuptools.bootstrap_install_from = egg | ||
437 | 92 | try: | ||
438 | 93 | import pkg_resources | ||
439 | 94 | except ImportError: | ||
440 | 95 | return do_download() | ||
441 | 96 | try: | ||
442 | 97 | pkg_resources.require("setuptools>="+version); return | ||
443 | 98 | except pkg_resources.VersionConflict, e: | ||
444 | 99 | if was_imported: | ||
445 | 100 | print >>sys.stderr, ( | ||
446 | 101 | "The required version of setuptools (>=%s) is not available, and\n" | ||
447 | 102 | "can't be installed while this script is running. Please install\n" | ||
448 | 103 | " a more recent version first, using 'easy_install -U setuptools'." | ||
449 | 104 | "\n\n(Currently using %r)" | ||
450 | 105 | ) % (version, e.args[0]) | ||
451 | 106 | sys.exit(2) | ||
452 | 107 | else: | ||
453 | 108 | del pkg_resources, sys.modules['pkg_resources'] # reload ok | ||
454 | 109 | return do_download() | ||
455 | 110 | except pkg_resources.DistributionNotFound: | ||
456 | 111 | return do_download() | ||
457 | 112 | |||
458 | 113 | def download_setuptools( | ||
459 | 114 | version=DEFAULT_VERSION, download_base=DEFAULT_URL, to_dir=os.curdir, | ||
460 | 115 | delay = 15 | ||
461 | 116 | ): | ||
462 | 117 | """Download setuptools from a specified location and return its filename | ||
463 | 118 | |||
464 | 119 | `version` should be a valid setuptools version number that is available | ||
465 | 120 | as an egg for download under the `download_base` URL (which should end | ||
466 | 121 | with a '/'). `to_dir` is the directory where the egg will be downloaded. | ||
467 | 122 | `delay` is the number of seconds to pause before an actual download attempt. | ||
468 | 123 | """ | ||
469 | 124 | import urllib2, shutil | ||
470 | 125 | egg_name = "setuptools-%s-py%s.egg" % (version,sys.version[:3]) | ||
471 | 126 | url = download_base + egg_name | ||
472 | 127 | saveto = os.path.join(to_dir, egg_name) | ||
473 | 128 | src = dst = None | ||
474 | 129 | if not os.path.exists(saveto): # Avoid repeated downloads | ||
475 | 130 | try: | ||
476 | 131 | from distutils import log | ||
477 | 132 | if delay: | ||
478 | 133 | log.warn(""" | ||
479 | 134 | --------------------------------------------------------------------------- | ||
480 | 135 | This script requires setuptools version %s to run (even to display | ||
481 | 136 | help). I will attempt to download it for you (from | ||
482 | 137 | %s), but | ||
483 | 138 | you may need to enable firewall access for this script first. | ||
484 | 139 | I will start the download in %d seconds. | ||
485 | 140 | |||
486 | 141 | (Note: if this machine does not have network access, please obtain the file | ||
487 | 142 | |||
488 | 143 | %s | ||
489 | 144 | |||
490 | 145 | and place it in this directory before rerunning this script.) | ||
491 | 146 | ---------------------------------------------------------------------------""", | ||
492 | 147 | version, download_base, delay, url | ||
493 | 148 | ); from time import sleep; sleep(delay) | ||
494 | 149 | log.warn("Downloading %s", url) | ||
495 | 150 | src = urllib2.urlopen(url) | ||
496 | 151 | # Read/write all in one block, so we don't create a corrupt file | ||
497 | 152 | # if the download is interrupted. | ||
498 | 153 | data = _validate_md5(egg_name, src.read()) | ||
499 | 154 | dst = open(saveto,"wb"); dst.write(data) | ||
500 | 155 | finally: | ||
501 | 156 | if src: src.close() | ||
502 | 157 | if dst: dst.close() | ||
503 | 158 | return os.path.realpath(saveto) | ||
504 | 159 | |||
505 | 160 | def main(argv, version=DEFAULT_VERSION): | ||
506 | 161 | """Install or upgrade setuptools and EasyInstall""" | ||
507 | 162 | try: | ||
508 | 163 | import setuptools | ||
509 | 164 | except ImportError: | ||
510 | 165 | egg = None | ||
511 | 166 | try: | ||
512 | 167 | egg = download_setuptools(version, delay=0) | ||
513 | 168 | sys.path.insert(0,egg) | ||
514 | 169 | from setuptools.command.easy_install import main | ||
515 | 170 | return main(list(argv)+[egg]) # we're done here | ||
516 | 171 | finally: | ||
517 | 172 | if egg and os.path.exists(egg): | ||
518 | 173 | os.unlink(egg) | ||
519 | 174 | else: | ||
520 | 175 | if setuptools.__version__ == '0.0.1': | ||
521 | 176 | print >>sys.stderr, ( | ||
522 | 177 | "You have an obsolete version of setuptools installed. Please\n" | ||
523 | 178 | "remove it from your system entirely before rerunning this script." | ||
524 | 179 | ) | ||
525 | 180 | sys.exit(2) | ||
526 | 181 | |||
527 | 182 | req = "setuptools>="+version | ||
528 | 183 | import pkg_resources | ||
529 | 184 | try: | ||
530 | 185 | pkg_resources.require(req) | ||
531 | 186 | except pkg_resources.VersionConflict: | ||
532 | 187 | try: | ||
533 | 188 | from setuptools.command.easy_install import main | ||
534 | 189 | except ImportError: | ||
535 | 190 | from easy_install import main | ||
536 | 191 | main(list(argv)+[download_setuptools(delay=0)]) | ||
537 | 192 | sys.exit(0) # try to force an exit | ||
538 | 193 | else: | ||
539 | 194 | if argv: | ||
540 | 195 | from setuptools.command.easy_install import main | ||
541 | 196 | main(argv) | ||
542 | 197 | else: | ||
543 | 198 | print "Setuptools version",version,"or greater has been installed." | ||
544 | 199 | print '(Run "ez_setup.py -U setuptools" to reinstall or upgrade.)' | ||
545 | 200 | |||
546 | 201 | def update_md5(filenames): | ||
547 | 202 | """Update our built-in md5 registry""" | ||
548 | 203 | |||
549 | 204 | import re | ||
550 | 205 | from md5 import md5 | ||
551 | 206 | |||
552 | 207 | for name in filenames: | ||
553 | 208 | base = os.path.basename(name) | ||
554 | 209 | f = open(name,'rb') | ||
555 | 210 | md5_data[base] = md5(f.read()).hexdigest() | ||
556 | 211 | f.close() | ||
557 | 212 | |||
558 | 213 | data = [" %r: %r,\n" % it for it in md5_data.items()] | ||
559 | 214 | data.sort() | ||
560 | 215 | repl = "".join(data) | ||
561 | 216 | |||
562 | 217 | import inspect | ||
563 | 218 | srcfile = inspect.getsourcefile(sys.modules[__name__]) | ||
564 | 219 | f = open(srcfile, 'rb'); src = f.read(); f.close() | ||
565 | 220 | |||
566 | 221 | match = re.search("\nmd5_data = {\n([^}]+)}", src) | ||
567 | 222 | if not match: | ||
568 | 223 | print >>sys.stderr, "Internal error!" | ||
569 | 224 | sys.exit(2) | ||
570 | 225 | |||
571 | 226 | src = src[:match.start(1)] + repl + src[match.end(1):] | ||
572 | 227 | f = open(srcfile,'w') | ||
573 | 228 | f.write(src) | ||
574 | 229 | f.close() | ||
575 | 230 | |||
576 | 231 | |||
577 | 232 | if __name__=='__main__': | ||
578 | 233 | if len(sys.argv)>2 and sys.argv[1]=='--md5update': | ||
579 | 234 | update_md5(sys.argv[2:]) | ||
580 | 235 | else: | ||
581 | 236 | main(sys.argv[1:]) | ||
582 | 237 | |||
583 | 238 | |||
584 | 239 | |||
585 | 240 | |||
586 | 241 | |||
587 | 0 | 242 | ||
588 | === modified file 'setup.py' (properties changed: -x to +x) | |||
589 | --- setup.py 2009-01-05 20:39:16 +0000 | |||
590 | +++ setup.py 2009-03-24 17:31:47 +0000 | |||
591 | @@ -1,11 +1,12 @@ | |||
592 | 1 | #!/usr/bin/env python | ||
593 | 2 | |||
594 | 1 | # Copyright 2008-2009 Canonical Ltd. All rights reserved. | 3 | # Copyright 2008-2009 Canonical Ltd. All rights reserved. |
595 | 2 | # | 4 | # |
596 | 3 | # This file is part of lazr.config. | 5 | # This file is part of lazr.config. |
597 | 4 | # | 6 | # |
598 | 5 | # lazr.config is free software: you can redistribute it and/or modify it | 7 | # lazr.config is free software: you can redistribute it and/or modify it |
599 | 6 | # under the terms of the GNU Lesser General Public License as published by | 8 | # under the terms of the GNU Lesser General Public License as published by |
602 | 7 | # the Free Software Foundation, either version 3 of the License, or (at your | 9 | # the Free Software Foundation, version 3 of the License. |
601 | 8 | # option) any later version. | ||
603 | 9 | # | 10 | # |
604 | 10 | # lazr.config is distributed in the hope that it will be useful, but WITHOUT | 11 | # lazr.config is distributed in the hope that it will be useful, but WITHOUT |
605 | 11 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 12 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
606 | @@ -15,6 +16,10 @@ | |||
607 | 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 |
608 | 16 | # along with lazr.config. If not, see <http://www.gnu.org/licenses/>. | 17 | # along with lazr.config. If not, see <http://www.gnu.org/licenses/>. |
609 | 17 | 18 | ||
610 | 19 | import ez_setup | ||
611 | 20 | ez_setup.use_setuptools() | ||
612 | 21 | |||
613 | 22 | import sys | ||
614 | 18 | from setuptools import setup, find_packages | 23 | from setuptools import setup, find_packages |
615 | 19 | 24 | ||
616 | 20 | # generic helpers primarily for the long_description | 25 | # generic helpers primarily for the long_description |
617 | @@ -31,9 +36,13 @@ | |||
618 | 31 | return '\n'.join(res) | 36 | return '\n'.join(res) |
619 | 32 | # end generic helpers | 37 | # end generic helpers |
620 | 33 | 38 | ||
621 | 39 | |||
622 | 40 | sys.path.insert(0, 'src') | ||
623 | 41 | from lazr.config import __version__ | ||
624 | 42 | |||
625 | 34 | setup( | 43 | setup( |
626 | 35 | name='lazr.config', | 44 | name='lazr.config', |
628 | 36 | version='1.1', | 45 | version=__version__, |
629 | 37 | namespace_packages=['lazr'], | 46 | namespace_packages=['lazr'], |
630 | 38 | packages=find_packages('src'), | 47 | packages=find_packages('src'), |
631 | 39 | package_dir={'':'src'}, | 48 | package_dir={'':'src'}, |
632 | @@ -52,10 +61,17 @@ | |||
633 | 52 | 'lazr.delegates', | 61 | 'lazr.delegates', |
634 | 53 | ], | 62 | ], |
635 | 54 | url='https://launchpad.net/lazr.config', | 63 | url='https://launchpad.net/lazr.config', |
636 | 64 | download_url= 'https://launchpad.net/lazr.config/+download', | ||
637 | 55 | classifiers=[ | 65 | classifiers=[ |
638 | 56 | "Development Status :: 5 - Production/Stable", | 66 | "Development Status :: 5 - Production/Stable", |
639 | 57 | "Intended Audience :: Developers", | 67 | "Intended Audience :: Developers", |
640 | 58 | "License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)", | 68 | "License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)", |
641 | 59 | "Operating System :: OS Independent", | 69 | "Operating System :: OS Independent", |
642 | 60 | "Programming Language :: Python"], | 70 | "Programming Language :: Python"], |
643 | 71 | extras_require=dict( | ||
644 | 72 | docs=['Sphinx', | ||
645 | 73 | 'z3c.recipe.sphinxdoc'] | ||
646 | 74 | ), | ||
647 | 75 | setup_requires=['eggtestinfo', 'setuptools_bzr'], | ||
648 | 76 | test_suite='lazr.config.tests', | ||
649 | 61 | ) | 77 | ) |
650 | 62 | 78 | ||
651 | === modified file 'src/lazr/__init__.py' | |||
652 | --- src/lazr/__init__.py 2009-01-05 20:39:16 +0000 | |||
653 | +++ src/lazr/__init__.py 2009-03-24 17:31:47 +0000 | |||
654 | @@ -4,8 +4,7 @@ | |||
655 | 4 | # | 4 | # |
656 | 5 | # lazr.config is free software: you can redistribute it and/or modify it | 5 | # lazr.config is free software: you can redistribute it and/or modify it |
657 | 6 | # under the terms of the GNU Lesser General Public License as published by | 6 | # under the terms of the GNU Lesser General Public License as published by |
660 | 7 | # the Free Software Foundation, either version 3 of the License, or (at your | 7 | # the Free Software Foundation, version 3 of the License. |
659 | 8 | # option) any later version. | ||
661 | 9 | # | 8 | # |
662 | 10 | # lazr.config is distributed in the hope that it will be useful, but WITHOUT | 9 | # lazr.config is distributed in the hope that it will be useful, but WITHOUT |
663 | 11 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 10 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
664 | 12 | 11 | ||
665 | === modified file 'src/lazr/config/CHANGES.txt' | |||
666 | --- src/lazr/config/CHANGES.txt 2009-01-05 20:39:16 +0000 | |||
667 | +++ src/lazr/config/CHANGES.txt 2009-03-24 17:31:47 +0000 | |||
668 | @@ -2,6 +2,14 @@ | |||
669 | 2 | Changes | 2 | Changes |
670 | 3 | ======= | 3 | ======= |
671 | 4 | 4 | ||
672 | 5 | 1.1.1 (2009-03-24) | ||
673 | 6 | ================== | ||
674 | 7 | |||
675 | 8 | - License clarification: only v3 of the LGPL is offered at this time, not | ||
676 | 9 | subsequent versions. | ||
677 | 10 | |||
678 | 11 | - Build is updated to support Sphinx docs and other small changes. | ||
679 | 12 | |||
680 | 5 | 1.1 (2009-01-05) | 13 | 1.1 (2009-01-05) |
681 | 6 | ================ | 14 | ================ |
682 | 7 | 15 | ||
683 | 8 | 16 | ||
684 | === modified file 'src/lazr/config/README.txt' | |||
685 | --- src/lazr/config/README.txt 2009-01-05 20:26:07 +0000 | |||
686 | +++ src/lazr/config/README.txt 2009-03-24 17:36:13 +0000 | |||
687 | @@ -3,8 +3,7 @@ | |||
688 | 3 | 3 | ||
689 | 4 | lazr.config is free software: you can redistribute it and/or modify it | 4 | lazr.config is free software: you can redistribute it and/or modify it |
690 | 5 | under the terms of the GNU Lesser General Public License as published by | 5 | under the terms of the GNU Lesser General Public License as published by |
693 | 6 | the Free Software Foundation, either version 3 of the License, or (at your | 6 | the Free Software Foundation, version 3 of the License. |
692 | 7 | option) any later version. | ||
694 | 8 | 7 | ||
695 | 9 | lazr.config is distributed in the hope that it will be useful, but WITHOUT | 8 | lazr.config is distributed in the hope that it will be useful, but WITHOUT |
696 | 10 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 9 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
697 | @@ -41,7 +40,7 @@ | |||
698 | 41 | 40 | ||
699 | 42 | >>> import lazr.config | 41 | >>> import lazr.config |
700 | 43 | >>> testfiles_dir = path.normpath(path.join( | 42 | >>> testfiles_dir = path.normpath(path.join( |
702 | 44 | ... path.dirname(lazr.config.__file__), 'testdata')) | 43 | ... path.dirname(lazr.config.__file__), 'tests', 'testdata')) |
703 | 45 | >>> base_conf = path.join(testfiles_dir, 'base.conf') | 44 | >>> base_conf = path.join(testfiles_dir, 'base.conf') |
704 | 46 | 45 | ||
705 | 47 | The config file contains sections enclosed in square brackets ([]). | 46 | The config file contains sections enclosed in square brackets ([]). |
706 | @@ -94,7 +93,7 @@ | |||
707 | 94 | >>> schema.name | 93 | >>> schema.name |
708 | 95 | 'base.conf' | 94 | 'base.conf' |
709 | 96 | >>> schema.filename | 95 | >>> schema.filename |
711 | 97 | '...lazr/config/testdata/base.conf' | 96 | '...lazr/config/tests/testdata/base.conf' |
712 | 98 | 97 | ||
713 | 99 | If you provide an optional file-like object as a second argument to the | 98 | If you provide an optional file-like object as a second argument to the |
714 | 100 | constructor, that is used instead of opening the named file implicitly. | 99 | constructor, that is used instead of opening the named file implicitly. |
715 | @@ -462,7 +461,7 @@ | |||
716 | 462 | >>> config.name | 461 | >>> config.name |
717 | 463 | 'local.conf' | 462 | 'local.conf' |
718 | 464 | >>> config.filename | 463 | >>> config.filename |
720 | 465 | '...lazr/config/testdata/local.conf' | 464 | '...lazr/config/tests/testdata/local.conf' |
721 | 466 | 465 | ||
722 | 467 | The config can access the schema via the schema property. | 466 | The config can access the schema via the schema property. |
723 | 468 | 467 | ||
724 | @@ -590,9 +589,9 @@ | |||
725 | 590 | The Section's type is the same type as the ConfigSchema.section_factory. | 589 | The Section's type is the same type as the ConfigSchema.section_factory. |
726 | 591 | 590 | ||
727 | 592 | >>> section_1 | 591 | >>> section_1 |
729 | 593 | <lazr.config.Section object at ...> | 592 | <lazr.config...Section object at ...> |
730 | 594 | >>> config.schema.section_factory | 593 | >>> config.schema.section_factory |
732 | 595 | <class 'lazr.config.Section'> | 594 | <class 'lazr.config...Section'> |
733 | 596 | 595 | ||
734 | 597 | A key can be verified to be in a Section. | 596 | A key can be verified to be in a Section. |
735 | 598 | 597 | ||
736 | @@ -1065,9 +1064,9 @@ | |||
737 | 1065 | 1064 | ||
738 | 1066 | >>> implicit_config = implicit_schema.load(local_conf) | 1065 | >>> implicit_config = implicit_schema.load(local_conf) |
739 | 1067 | >>> implicit_config | 1066 | >>> implicit_config |
741 | 1068 | <lazr.config.Config object at ...> | 1067 | <lazr.config...Config object at ...> |
742 | 1069 | >>> config | 1068 | >>> config |
744 | 1070 | <lazr.config.Config object at ...> | 1069 | <lazr.config...Config object at ...> |
745 | 1071 | 1070 | ||
746 | 1072 | >>> sections = sorted(section.name for section in config) | 1071 | >>> sections = sorted(section.name for section in config) |
747 | 1073 | >>> implicit_sections = sorted( | 1072 | >>> implicit_sections = sorted( |
748 | @@ -1081,7 +1080,7 @@ | |||
749 | 1081 | But the type of sections in the config support implicit typing. | 1080 | But the type of sections in the config support implicit typing. |
750 | 1082 | 1081 | ||
751 | 1083 | >>> implicit_config['section_3.app_b'] | 1082 | >>> implicit_config['section_3.app_b'] |
753 | 1084 | <lazr.config.ImplicitTypeSection object at ...> | 1083 | <lazr.config...ImplicitTypeSection object at ...> |
754 | 1085 | 1084 | ||
755 | 1086 | ImplicitTypeSection, in contrast to Section, converts values that | 1085 | ImplicitTypeSection, in contrast to Section, converts values that |
756 | 1087 | appear to be integer or boolean into ints and bools. | 1086 | appear to be integer or boolean into ints and bools. |
757 | @@ -1447,3 +1446,13 @@ | |||
758 | 1447 | Traceback (most recent call last): | 1446 | Traceback (most recent call last): |
759 | 1448 | ... | 1447 | ... |
760 | 1449 | AttributeError: 'module' object has no attribute 'CHEESE' | 1448 | AttributeError: 'module' object has no attribute 'CHEESE' |
761 | 1449 | |||
762 | 1450 | =============== | ||
763 | 1451 | Other Documents | ||
764 | 1452 | =============== | ||
765 | 1453 | |||
766 | 1454 | .. toctree:: | ||
767 | 1455 | :glob: | ||
768 | 1456 | |||
769 | 1457 | * | ||
770 | 1458 | docs/* | ||
771 | 1450 | 1459 | ||
772 | === added file 'src/lazr/config/__init__.py' | |||
773 | --- src/lazr/config/__init__.py 1970-01-01 00:00:00 +0000 | |||
774 | +++ src/lazr/config/__init__.py 2009-03-24 17:31:47 +0000 | |||
775 | @@ -0,0 +1,30 @@ | |||
776 | 1 | # Copyright 2007-2009 Canonical Ltd. All rights reserved. | ||
777 | 2 | # | ||
778 | 3 | # This file is part of lazr.config | ||
779 | 4 | # | ||
780 | 5 | # lazr.config is free software: you can redistribute it and/or modify it | ||
781 | 6 | # under the terms of the GNU Lesser General Public License as published by | ||
782 | 7 | # the Free Software Foundation, version 3 of the License. | ||
783 | 8 | # | ||
784 | 9 | # lazr.config is distributed in the hope that it will be useful, but WITHOUT | ||
785 | 10 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
786 | 11 | # FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | ||
787 | 12 | # License for more details. | ||
788 | 13 | # | ||
789 | 14 | # You should have received a copy of the GNU Lesser General Public License | ||
790 | 15 | # along with lazr.config. If not, see <http://www.gnu.org/licenses/>. | ||
791 | 16 | |||
792 | 17 | """A configuration file system.""" | ||
793 | 18 | |||
794 | 19 | __version__ = '1.1.1' | ||
795 | 20 | |||
796 | 21 | # Re-export in such a way that __version__ can still be imported if | ||
797 | 22 | # dependencies are not yet available. | ||
798 | 23 | try: | ||
799 | 24 | # While we generally frown on "*" imports, this, combined with the fact we | ||
800 | 25 | # only test code from this module, means that we can verify what has been | ||
801 | 26 | # exported. | ||
802 | 27 | from lazr.config._config import * | ||
803 | 28 | from lazr.config._config import __all__ | ||
804 | 29 | except ImportError: | ||
805 | 30 | pass | ||
806 | 0 | 31 | ||
807 | === renamed file 'src/lazr/config/__init__.py' => 'src/lazr/config/_config.py' | |||
808 | --- src/lazr/config/__init__.py 2009-01-05 20:39:16 +0000 | |||
809 | +++ src/lazr/config/_config.py 2009-03-24 17:31:47 +0000 | |||
810 | @@ -4,8 +4,7 @@ | |||
811 | 4 | # | 4 | # |
812 | 5 | # lazr.config is free software: you can redistribute it and/or modify it | 5 | # lazr.config is free software: you can redistribute it and/or modify it |
813 | 6 | # under the terms of the GNU Lesser General Public License as published by | 6 | # under the terms of the GNU Lesser General Public License as published by |
816 | 7 | # the Free Software Foundation, either version 3 of the License, or (at your | 7 | # the Free Software Foundation, version 3 of the License. |
815 | 8 | # option) any later version. | ||
817 | 9 | # | 8 | # |
818 | 10 | # lazr.config is distributed in the hope that it will be useful, but WITHOUT | 9 | # lazr.config is distributed in the hope that it will be useful, but WITHOUT |
819 | 11 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | 10 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
820 | @@ -840,7 +839,7 @@ | |||
821 | 840 | 839 | ||
822 | 841 | def as_log_level(value): | 840 | def as_log_level(value): |
823 | 842 | """Turn a string into a log level. | 841 | """Turn a string into a log level. |
825 | 843 | 842 | ||
826 | 844 | :param value: A string with a value (case-insensitive) equal to one of the | 843 | :param value: A string with a value (case-insensitive) equal to one of the |
827 | 845 | symbolic logging levels. | 844 | symbolic logging levels. |
828 | 846 | :type value: string | 845 | :type value: string |
829 | 847 | 846 | ||
830 | === modified file 'src/lazr/config/interfaces.py' | |||
831 | --- src/lazr/config/interfaces.py 2008-12-23 01:59:49 +0000 | |||
832 | +++ src/lazr/config/interfaces.py 2009-03-24 17:31:47 +0000 | |||
833 | @@ -1,4 +1,19 @@ | |||
835 | 1 | # Copyright 2007 Canonical Ltd. All rights reserved. | 1 | # Copyright 2007-2009 Canonical Ltd. All rights reserved. |
836 | 2 | # | ||
837 | 3 | # This file is part of lazr.config | ||
838 | 4 | # | ||
839 | 5 | # lazr.config is free software: you can redistribute it and/or modify it | ||
840 | 6 | # under the terms of the GNU Lesser General Public License as published by | ||
841 | 7 | # the Free Software Foundation, version 3 of the License. | ||
842 | 8 | # | ||
843 | 9 | # lazr.config is distributed in the hope that it will be useful, but WITHOUT | ||
844 | 10 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
845 | 11 | # FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | ||
846 | 12 | # License for more details. | ||
847 | 13 | # | ||
848 | 14 | # You should have received a copy of the GNU Lesser General Public License | ||
849 | 15 | # along with lazr.config. If not, see <http://www.gnu.org/licenses/>. | ||
850 | 16 | |||
851 | 2 | # pylint: disable-msg=E0211,E0213,W0231 | 17 | # pylint: disable-msg=E0211,E0213,W0231 |
852 | 3 | """Interfaces for process configuration..""" | 18 | """Interfaces for process configuration..""" |
853 | 4 | 19 | ||
854 | 5 | 20 | ||
855 | === added directory 'src/lazr/config/tests' | |||
856 | === added file 'src/lazr/config/tests/__init__.py' | |||
857 | --- src/lazr/config/tests/__init__.py 1970-01-01 00:00:00 +0000 | |||
858 | +++ src/lazr/config/tests/__init__.py 2009-03-24 17:31:47 +0000 | |||
859 | @@ -0,0 +1,17 @@ | |||
860 | 1 | # Copyright 2007-2009 Canonical Ltd. All rights reserved. | ||
861 | 2 | # | ||
862 | 3 | # This file is part of lazr.config | ||
863 | 4 | # | ||
864 | 5 | # lazr.config is free software: you can redistribute it and/or modify it | ||
865 | 6 | # under the terms of the GNU Lesser General Public License as published by | ||
866 | 7 | # the Free Software Foundation, version 3 of the License. | ||
867 | 8 | # | ||
868 | 9 | # lazr.config is distributed in the hope that it will be useful, but WITHOUT | ||
869 | 10 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
870 | 11 | # FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | ||
871 | 12 | # License for more details. | ||
872 | 13 | # | ||
873 | 14 | # You should have received a copy of the GNU Lesser General Public License | ||
874 | 15 | # along with lazr.config. If not, see <http://www.gnu.org/licenses/>. | ||
875 | 16 | |||
876 | 17 | """Test package for lazr.config.""" | ||
877 | 0 | 18 | ||
878 | === renamed file 'src/lazr/config/tests.py' => 'src/lazr/config/tests/test_docs.py' | |||
879 | --- src/lazr/config/tests.py 2008-12-15 22:22:12 +0000 | |||
880 | +++ src/lazr/config/tests/test_docs.py 2009-03-24 17:31:47 +0000 | |||
881 | @@ -1,17 +1,51 @@ | |||
883 | 1 | # Copyright 2008 Canonical Ltd. All rights reserved. | 1 | # Copyright 2009 Canonical Ltd. All rights reserved. |
884 | 2 | # | ||
885 | 3 | # This file is part of lazr.config | ||
886 | 4 | # | ||
887 | 5 | # lazr.config is free software: you can redistribute it and/or modify it | ||
888 | 6 | # under the terms of the GNU Lesser General Public License as published by | ||
889 | 7 | # the Free Software Foundation, version 3 of the License. | ||
890 | 8 | # | ||
891 | 9 | # lazr.config is distributed in the hope that it will be useful, but WITHOUT | ||
892 | 10 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
893 | 11 | # FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | ||
894 | 12 | # License for more details. | ||
895 | 13 | # | ||
896 | 14 | # You should have received a copy of the GNU Lesser General Public License | ||
897 | 15 | # along with lazr.config. If not, see <http://www.gnu.org/licenses/>. | ||
898 | 16 | "Test harness for doctests." | ||
899 | 2 | 17 | ||
901 | 3 | """Test harness.""" | 18 | # pylint: disable-msg=E0611,W0142 |
902 | 4 | 19 | ||
903 | 5 | __metaclass__ = type | 20 | __metaclass__ = type |
905 | 6 | __all__ = [] | 21 | __all__ = [ |
906 | 22 | 'additional_tests', | ||
907 | 23 | ] | ||
908 | 7 | 24 | ||
909 | 25 | import atexit | ||
910 | 8 | import doctest | 26 | import doctest |
911 | 27 | import os | ||
912 | 28 | from pkg_resources import ( | ||
913 | 29 | resource_filename, resource_exists, resource_listdir, cleanup_resources) | ||
914 | 9 | import unittest | 30 | import unittest |
915 | 10 | 31 | ||
918 | 11 | 32 | DOCTEST_FLAGS = ( | |
919 | 12 | def test_suite(): | 33 | doctest.ELLIPSIS | |
920 | 34 | doctest.NORMALIZE_WHITESPACE | | ||
921 | 35 | doctest.REPORT_NDIFF) | ||
922 | 36 | |||
923 | 37 | |||
924 | 38 | def additional_tests(): | ||
925 | 39 | "Run the doc tests (README.txt and docs/*, if any exist)" | ||
926 | 40 | doctest_files = [ | ||
927 | 41 | os.path.abspath(resource_filename('lazr.config', 'README.txt'))] | ||
928 | 42 | if resource_exists('lazr.config', 'docs'): | ||
929 | 43 | for name in resource_listdir('lazr.config', 'docs'): | ||
930 | 44 | if name.endswith('.txt'): | ||
931 | 45 | doctest_files.append( | ||
932 | 46 | os.path.abspath( | ||
933 | 47 | resource_filename('lazr.config', 'docs/%s' % name))) | ||
934 | 48 | kwargs = dict(module_relative=False, optionflags=DOCTEST_FLAGS) | ||
935 | 49 | atexit.register(cleanup_resources) | ||
936 | 13 | return unittest.TestSuite(( | 50 | return unittest.TestSuite(( |
941 | 14 | doctest.DocFileSuite( | 51 | doctest.DocFileSuite(*doctest_files, **kwargs))) |
938 | 15 | 'README.txt', | ||
939 | 16 | optionflags=doctest.NORMALIZE_WHITESPACE|doctest.ELLIPSIS), | ||
940 | 17 | )) | ||
942 | 18 | 52 | ||
943 | === renamed directory 'src/lazr/config/testdata' => 'src/lazr/config/tests/testdata' |
The same changes as for the other lazr packages:
- license specifies v3 of LGPL
- buildout updates
Thanks
Gary