Merge lp:~gary/lazr.delegates/build-license-changes into lp:~launchpad-pqm/lazr.delegates/devel

Proposed by Gary Poster
Status: Merged
Approved by: Francis J. Lacoste
Approved revision: 4
Merged at revision: not available
Proposed branch: lp:~gary/lazr.delegates/build-license-changes
Merge into: lp:~launchpad-pqm/lazr.delegates/devel
Diff against target: None lines
To merge this branch: bzr merge lp:~gary/lazr.delegates/build-license-changes
Reviewer Review Type Date Requested Status
Francis J. Lacoste (community) Approve
Review via email: mp+4856@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Gary Poster (gary) wrote :

The same changes as for the other lazr packages:

- license specifies v3 of LGPL

- buildout updates

Thanks

Gary

Revision history for this message
Francis J. Lacoste (flacoste) wrote :

On March 24, 2009, Gary Poster wrote:
> Gary Poster has proposed merging
> lp:~gary/lazr.delegates/build-license-changes into lp:lazr.delegates.
>
> 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

Nothing to say here.

--
Francis J. Lacoste
<email address hidden>

review: Approve
5. By Gary Poster

1.0.1

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file '.bzrignore'
--- .bzrignore 2008-12-15 22:21:53 +0000
+++ .bzrignore 2009-03-24 18:52:52 +0000
@@ -1,8 +1,11 @@
1TEST_THIS_REST_BEFORE_REGISTERING.txt
2bin1bin
3develop-eggs2develop-eggs
4eggs3.installed.cfg
4develop-eggs
5parts5parts
6src/*.egg-info6*.egg-info
7.installed.cfg7tags
8TAGS
9build
10*.egg
8dist11dist
912
=== modified file 'CHANGES.txt'
--- CHANGES.txt 2008-12-15 22:21:53 +0000
+++ CHANGES.txt 2009-03-24 18:56:04 +0000
@@ -1,1 +1,16 @@
1Please see CHANGES.txt in the package.1Please see CHANGES.txt in the package.
2
3..
4 This file is part of lazr.delegates.
5
6 lazr.delegates is free software: you can redistribute it and/or modify it
7 under the terms of the GNU Lesser General Public License as published by
8 the Free Software Foundation, version 3 of the License.
9
10 lazr.delegates is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
13 License for more details.
14
15 You should have received a copy of the GNU Lesser General Public License
16 along with lazr.delegates. If not, see <http://www.gnu.org/licenses/>.
217
=== renamed file 'DEVELOP.txt' => 'HACKING.txt'
--- DEVELOP.txt 2008-12-15 22:21:53 +0000
+++ HACKING.txt 2009-03-24 19:51:29 +0000
@@ -1,59 +1,41 @@
1..
2 This file is part of lazr.delegates.
3
4 lazr.delegates is free software: you can redistribute it and/or modify it
5 under the terms of the GNU Lesser General Public License as published by
6 the Free Software Foundation, version 3 of the License.
7
8 lazr.delegates is distributed in the hope that it will be useful, but
9 WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
10 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
11 License for more details.
12
13 You should have received a copy of the GNU Lesser General Public License
14 along with lazr.delegates. If not, see <http://www.gnu.org/licenses/>.
15
1This project uses zc.buildout for development.16This project uses zc.buildout for development.
217
3To develop or run tests, first run ``$DESIRED_PYTHON bootstrap.py`` in this18============
4directory, where you replace ``$DESIRED_PYTHON`` with the python that should19Introduction
5be used to build and run this project. A non-system Python is highly20============
6recommended, but not required.21
722These are guidelines for hacking on the lazr.delegates project. But first,
8Then run ``./bin/buildout``. (NOTE: Ubuntu Intrepid users, see bottom of this23please see the common hacking guidelines at:
9document if this generates errors.)24
1025 http://dev.launchpad.net/Hacking
11You can now run tests with ``./bin/test``. Use ``./bin/test --help`` to read26
12about the many options.27
1328Getting help
14To gain access to a Python interpreter with the package and its dependent eggs29------------
15available, use ``./bin/py``.30
1631If you find bugs in this package, you can report them here:
17You can generate ctags and idutils files for a variety of editors using32
18``./bin/tags`` (see ``./bin/tags --help``). The advantage of the files33 https://launchpad.net/lazr.delegates
19generated from this utility is that they include the sourcecode from the eggs34
20used in this buildout.35If you want to discuss this package, join the team and mailing list here:
2136
22To generate distributions, use ``./bin/buildout setup . SETUP_CMD [...]``.37 https://launchpad.net/~lazr-developers
23That is, you can use ``./bin/buildout setup .`` as if it were38
24``python setup.py``. The intended advantage is easy access to a pristine,39or send a message to:
25local version of setuptools.40
2641 lazr-developers@lists.launchpad.net
27Every project using zc.buildout will keep its own collection of eggs by
28default. You may want to cache these eggs, and their downloaded
29distributions, globally. To do so, perform the following instructions.
30
31- ``mkdir -p ~/.buildout/eggs``
32- ``mkdir ~/.buildout/download-cache``
33- Create ``~/.buildout/default.cfg`` with the following content, replacing
34 "$HOME" with the path to your home::
35
36 [buildout]
37 eggs-directory=$HOME/.buildout/eggs
38 download-cache=$HOME/.buildout/download-cache
39
40Ubunutu Intrepid Problem
41========================
42
43Intrepid has a bug working with buildout. You may have to hack to fix it.
44Here's an example of the Python 2.4 version of the hack.
45
46$ sudo rm /usr/lib/python2.4/site-packages/GMenuSimpleEditor/*.py
47$ sudo ln
48-s /var/lib/python-support/python2.4/GMenuSimpleEditor/*.py /usr/lib/python2.4/site-packages/GMenuSimpleEditor/
49
50Python 2.5 would need the same kind of fix (replace all three instances of
51"python2.4" with "python2.5" in the above).
52
53The author of this document tried an Intrepid upgrade and an aptitude
54reinstall of python-gmenu to no avail before doing the rough-and-tumble change
55described above.
56
57See
58https://bugs.edge.launchpad.net/ubuntu/+source/gnome-menus/+bug/301571 and the
59bug linked to it by datakid.
6042
=== modified file 'MANIFEST.in'
--- MANIFEST.in 2008-12-15 22:21:53 +0000
+++ MANIFEST.in 2009-03-24 18:52:52 +0000
@@ -1,2 +1,2 @@
1include *.txt MANIFEST.in1exclude MANIFEST.in buildout.cfg bootstrap.py .bzrignore
2recursive-include src *.txt *.py2prune _bootstrap
33
=== modified file 'README.txt'
--- README.txt 2008-12-15 22:21:53 +0000
+++ README.txt 2009-03-24 19:51:29 +0000
@@ -1,1 +1,16 @@
1Easily write objects that delegate behavior.1Easily write objects that delegate behavior.
2
3..
4 This file is part of lazr.delegates.
5
6 lazr.delegates is free software: you can redistribute it and/or modify it
7 under the terms of the GNU Lesser General Public License as published by
8 the Free Software Foundation, version 3 of the License.
9
10 lazr.delegates is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
13 License for more details.
14
15 You should have received a copy of the GNU Lesser General Public License
16 along with lazr.delegates. If not, see <http://www.gnu.org/licenses/>.
217
=== added directory '_bootstrap'
=== added file '_bootstrap/COPYRIGHT.txt'
--- _bootstrap/COPYRIGHT.txt 1970-01-01 00:00:00 +0000
+++ _bootstrap/COPYRIGHT.txt 2009-03-24 18:52:52 +0000
@@ -0,0 +1,9 @@
1Copyright (c) 2004-2009 Zope Corporation and Contributors.
2All Rights Reserved.
3
4This software is subject to the provisions of the Zope Public License,
5Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
6THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
7WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
8WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
9FOR A PARTICULAR PURPOSE.
010
=== added file '_bootstrap/LICENSE.txt'
--- _bootstrap/LICENSE.txt 1970-01-01 00:00:00 +0000
+++ _bootstrap/LICENSE.txt 2009-03-24 18:52:52 +0000
@@ -0,0 +1,54 @@
1Zope Public License (ZPL) Version 2.1
2-------------------------------------
3
4A copyright notice accompanies this license document that
5identifies the copyright holders.
6
7This license has been certified as open source. It has also
8been designated as GPL compatible by the Free Software
9Foundation (FSF).
10
11Redistribution and use in source and binary forms, with or
12without modification, are permitted provided that the
13following conditions are met:
14
151. Redistributions in source code must retain the
16 accompanying copyright notice, this list of conditions,
17 and the following disclaimer.
18
192. Redistributions in binary form must reproduce the accompanying
20 copyright notice, this list of conditions, and the
21 following disclaimer in the documentation and/or other
22 materials provided with the distribution.
23
243. Names of the copyright holders must not be used to
25 endorse or promote products derived from this software
26 without prior written permission from the copyright
27 holders.
28
294. The right to distribute this software or to use it for
30 any purpose does not give you the right to use
31 Servicemarks (sm) or Trademarks (tm) of the copyright
32 holders. Use of them is covered by separate agreement
33 with the copyright holders.
34
355. If any files are modified, you must cause the modified
36 files to carry prominent notices stating that you changed
37 the files and the date of any change.
38
39Disclaimer
40
41 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS''
42 AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT
43 NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
44 AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
45 NO EVENT SHALL THE COPYRIGHT HOLDERS BE
46 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
47 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
48 LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
49 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
50 HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
51 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
52 OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
53 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
54 DAMAGE.
0\ No newline at end of file55\ No newline at end of file
156
=== renamed file 'bootstrap.py' => '_bootstrap/bootstrap.py'
=== added symlink 'bootstrap.py'
=== target is '_bootstrap/bootstrap.py'
=== modified file 'buildout.cfg'
--- buildout.cfg 2008-12-15 22:21:53 +0000
+++ buildout.cfg 2009-03-24 19:51:29 +0000
@@ -2,6 +2,7 @@
2parts =2parts =
3 interpreter3 interpreter
4 test4 test
5 docs
5 tags6 tags
6unzip = true7unzip = true
78
@@ -10,7 +11,14 @@
10[test]11[test]
11recipe = zc.recipe.testrunner12recipe = zc.recipe.testrunner
12eggs = lazr.delegates13eggs = lazr.delegates
13defaults = '--tests-pattern ^tests --exit-with-status'.split()14defaults = '--tests-pattern ^tests --exit-with-status --suite-name additional_tests'.split()
15
16[docs]
17recipe = z3c.recipe.sphinxdoc
18eggs = lazr.delegates [docs]
19index-doc = README
20default.css =
21layout.html =
1422
15[interpreter]23[interpreter]
16recipe = zc.recipe.egg24recipe = zc.recipe.egg
1725
=== added file 'ez_setup.py'
--- ez_setup.py 1970-01-01 00:00:00 +0000
+++ ez_setup.py 2009-03-24 18:52:52 +0000
@@ -0,0 +1,241 @@
1#!python
2"""Bootstrap setuptools installation
3
4If you want to use setuptools in your package's setup.py, just include this
5file in the same directory with it, and add this to the top of your setup.py::
6
7 from ez_setup import use_setuptools
8 use_setuptools()
9
10If you want to require a specific version of setuptools, set a download
11mirror, or use an alternate download directory, you can do so by supplying
12the appropriate options to ``use_setuptools()``.
13
14This file can also be run as a script to install or upgrade setuptools.
15"""
16import sys
17DEFAULT_VERSION = "0.6c8"
18DEFAULT_URL = "http://pypi.python.org/packages/%s/s/setuptools/" % sys.version[:3]
19
20md5_data = {
21 'setuptools-0.6b1-py2.3.egg': '8822caf901250d848b996b7f25c6e6ca',
22 'setuptools-0.6b1-py2.4.egg': 'b79a8a403e4502fbb85ee3f1941735cb',
23 'setuptools-0.6b2-py2.3.egg': '5657759d8a6d8fc44070a9d07272d99b',
24 'setuptools-0.6b2-py2.4.egg': '4996a8d169d2be661fa32a6e52e4f82a',
25 'setuptools-0.6b3-py2.3.egg': 'bb31c0fc7399a63579975cad9f5a0618',
26 'setuptools-0.6b3-py2.4.egg': '38a8c6b3d6ecd22247f179f7da669fac',
27 'setuptools-0.6b4-py2.3.egg': '62045a24ed4e1ebc77fe039aa4e6f7e5',
28 'setuptools-0.6b4-py2.4.egg': '4cb2a185d228dacffb2d17f103b3b1c4',
29 'setuptools-0.6c1-py2.3.egg': 'b3f2b5539d65cb7f74ad79127f1a908c',
30 'setuptools-0.6c1-py2.4.egg': 'b45adeda0667d2d2ffe14009364f2a4b',
31 'setuptools-0.6c2-py2.3.egg': 'f0064bf6aa2b7d0f3ba0b43f20817c27',
32 'setuptools-0.6c2-py2.4.egg': '616192eec35f47e8ea16cd6a122b7277',
33 'setuptools-0.6c3-py2.3.egg': 'f181fa125dfe85a259c9cd6f1d7b78fa',
34 'setuptools-0.6c3-py2.4.egg': 'e0ed74682c998bfb73bf803a50e7b71e',
35 'setuptools-0.6c3-py2.5.egg': 'abef16fdd61955514841c7c6bd98965e',
36 'setuptools-0.6c4-py2.3.egg': 'b0b9131acab32022bfac7f44c5d7971f',
37 'setuptools-0.6c4-py2.4.egg': '2a1f9656d4fbf3c97bf946c0a124e6e2',
38 'setuptools-0.6c4-py2.5.egg': '8f5a052e32cdb9c72bcf4b5526f28afc',
39 'setuptools-0.6c5-py2.3.egg': 'ee9fd80965da04f2f3e6b3576e9d8167',
40 'setuptools-0.6c5-py2.4.egg': 'afe2adf1c01701ee841761f5bcd8aa64',
41 'setuptools-0.6c5-py2.5.egg': 'a8d3f61494ccaa8714dfed37bccd3d5d',
42 'setuptools-0.6c6-py2.3.egg': '35686b78116a668847237b69d549ec20',
43 'setuptools-0.6c6-py2.4.egg': '3c56af57be3225019260a644430065ab',
44 'setuptools-0.6c6-py2.5.egg': 'b2f8a7520709a5b34f80946de5f02f53',
45 'setuptools-0.6c7-py2.3.egg': '209fdf9adc3a615e5115b725658e13e2',
46 'setuptools-0.6c7-py2.4.egg': '5a8f954807d46a0fb67cf1f26c55a82e',
47 'setuptools-0.6c7-py2.5.egg': '45d2ad28f9750e7434111fde831e8372',
48 'setuptools-0.6c8-py2.3.egg': '50759d29b349db8cfd807ba8303f1902',
49 'setuptools-0.6c8-py2.4.egg': 'cba38d74f7d483c06e9daa6070cce6de',
50 'setuptools-0.6c8-py2.5.egg': '1721747ee329dc150590a58b3e1ac95b',
51}
52
53import sys, os
54
55def _validate_md5(egg_name, data):
56 if egg_name in md5_data:
57 from md5 import md5
58 digest = md5(data).hexdigest()
59 if digest != md5_data[egg_name]:
60 print >>sys.stderr, (
61 "md5 validation of %s failed! (Possible download problem?)"
62 % egg_name
63 )
64 sys.exit(2)
65 return data
66
67
68def use_setuptools(
69 version=DEFAULT_VERSION, download_base=DEFAULT_URL, to_dir=os.curdir,
70 download_delay=15, min_version=None
71):
72 """Automatically find/download setuptools and make it available on sys.path
73
74 `version` should be a valid setuptools version number that is available
75 as an egg for download under the `download_base` URL (which should end with
76 a '/'). `to_dir` is the directory where setuptools will be downloaded, if
77 it is not already available. If `download_delay` is specified, it should
78 be the number of seconds that will be paused before initiating a download,
79 should one be required. If an older version of setuptools is installed,
80 this routine will print a message to ``sys.stderr`` and raise SystemExit in
81 an attempt to abort the calling script.
82 """
83 # Work around a hack in the ez_setup.py file from simplejson==1.7.3.
84 if min_version:
85 version = min_version
86
87 was_imported = 'pkg_resources' in sys.modules or 'setuptools' in sys.modules
88 def do_download():
89 egg = download_setuptools(version, download_base, to_dir, download_delay)
90 sys.path.insert(0, egg)
91 import setuptools; setuptools.bootstrap_install_from = egg
92 try:
93 import pkg_resources
94 except ImportError:
95 return do_download()
96 try:
97 pkg_resources.require("setuptools>="+version); return
98 except pkg_resources.VersionConflict, e:
99 if was_imported:
100 print >>sys.stderr, (
101 "The required version of setuptools (>=%s) is not available, and\n"
102 "can't be installed while this script is running. Please install\n"
103 " a more recent version first, using 'easy_install -U setuptools'."
104 "\n\n(Currently using %r)"
105 ) % (version, e.args[0])
106 sys.exit(2)
107 else:
108 del pkg_resources, sys.modules['pkg_resources'] # reload ok
109 return do_download()
110 except pkg_resources.DistributionNotFound:
111 return do_download()
112
113def download_setuptools(
114 version=DEFAULT_VERSION, download_base=DEFAULT_URL, to_dir=os.curdir,
115 delay = 15
116):
117 """Download setuptools from a specified location and return its filename
118
119 `version` should be a valid setuptools version number that is available
120 as an egg for download under the `download_base` URL (which should end
121 with a '/'). `to_dir` is the directory where the egg will be downloaded.
122 `delay` is the number of seconds to pause before an actual download attempt.
123 """
124 import urllib2, shutil
125 egg_name = "setuptools-%s-py%s.egg" % (version,sys.version[:3])
126 url = download_base + egg_name
127 saveto = os.path.join(to_dir, egg_name)
128 src = dst = None
129 if not os.path.exists(saveto): # Avoid repeated downloads
130 try:
131 from distutils import log
132 if delay:
133 log.warn("""
134---------------------------------------------------------------------------
135This script requires setuptools version %s to run (even to display
136help). I will attempt to download it for you (from
137%s), but
138you may need to enable firewall access for this script first.
139I will start the download in %d seconds.
140
141(Note: if this machine does not have network access, please obtain the file
142
143 %s
144
145and place it in this directory before rerunning this script.)
146---------------------------------------------------------------------------""",
147 version, download_base, delay, url
148 ); from time import sleep; sleep(delay)
149 log.warn("Downloading %s", url)
150 src = urllib2.urlopen(url)
151 # Read/write all in one block, so we don't create a corrupt file
152 # if the download is interrupted.
153 data = _validate_md5(egg_name, src.read())
154 dst = open(saveto,"wb"); dst.write(data)
155 finally:
156 if src: src.close()
157 if dst: dst.close()
158 return os.path.realpath(saveto)
159
160def main(argv, version=DEFAULT_VERSION):
161 """Install or upgrade setuptools and EasyInstall"""
162 try:
163 import setuptools
164 except ImportError:
165 egg = None
166 try:
167 egg = download_setuptools(version, delay=0)
168 sys.path.insert(0,egg)
169 from setuptools.command.easy_install import main
170 return main(list(argv)+[egg]) # we're done here
171 finally:
172 if egg and os.path.exists(egg):
173 os.unlink(egg)
174 else:
175 if setuptools.__version__ == '0.0.1':
176 print >>sys.stderr, (
177 "You have an obsolete version of setuptools installed. Please\n"
178 "remove it from your system entirely before rerunning this script."
179 )
180 sys.exit(2)
181
182 req = "setuptools>="+version
183 import pkg_resources
184 try:
185 pkg_resources.require(req)
186 except pkg_resources.VersionConflict:
187 try:
188 from setuptools.command.easy_install import main
189 except ImportError:
190 from easy_install import main
191 main(list(argv)+[download_setuptools(delay=0)])
192 sys.exit(0) # try to force an exit
193 else:
194 if argv:
195 from setuptools.command.easy_install import main
196 main(argv)
197 else:
198 print "Setuptools version",version,"or greater has been installed."
199 print '(Run "ez_setup.py -U setuptools" to reinstall or upgrade.)'
200
201def update_md5(filenames):
202 """Update our built-in md5 registry"""
203
204 import re
205 from md5 import md5
206
207 for name in filenames:
208 base = os.path.basename(name)
209 f = open(name,'rb')
210 md5_data[base] = md5(f.read()).hexdigest()
211 f.close()
212
213 data = [" %r: %r,\n" % it for it in md5_data.items()]
214 data.sort()
215 repl = "".join(data)
216
217 import inspect
218 srcfile = inspect.getsourcefile(sys.modules[__name__])
219 f = open(srcfile, 'rb'); src = f.read(); f.close()
220
221 match = re.search("\nmd5_data = {\n([^}]+)}", src)
222 if not match:
223 print >>sys.stderr, "Internal error!"
224 sys.exit(2)
225
226 src = src[:match.start(1)] + repl + src[match.end(1):]
227 f = open(srcfile,'w')
228 f.write(src)
229 f.close()
230
231
232if __name__=='__main__':
233 if len(sys.argv)>2 and sys.argv[1]=='--md5update':
234 update_md5(sys.argv[2:])
235 else:
236 main(sys.argv[1:])
237
238
239
240
241
0242
=== modified file 'setup.py' (properties changed: -x to +x)
--- setup.py 2008-12-15 22:21:53 +0000
+++ setup.py 2009-03-24 19:51:29 +0000
@@ -1,5 +1,25 @@
1# Copyright 2008 Canonical Ltd. All rights reserved.1#!/usr/bin/env python
22
3# Copyright 2008-2009 Canonical Ltd. All rights reserved.
4#
5# This file is part of lazr.delegates.
6#
7# lazr.delegates is free software: you can redistribute it and/or modify it
8# under the terms of the GNU Lesser General Public License as published by
9# the Free Software Foundation, version 3 of the License.
10#
11# lazr.delegates is distributed in the hope that it will be useful, but
12# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
14# License for more details.
15#
16# You should have received a copy of the GNU Lesser General Public License
17# along with lazr.delegates. If not, see <http://www.gnu.org/licenses/>.
18
19import ez_setup
20ez_setup.use_setuptools()
21
22import sys
3from setuptools import setup, find_packages23from setuptools import setup, find_packages
424
5# generic helpers primarily for the long_description25# generic helpers primarily for the long_description
@@ -16,9 +36,13 @@
16 return '\n'.join(res)36 return '\n'.join(res)
17# end generic helpers37# end generic helpers
1838
39
40sys.path.insert(0, 'src')
41from lazr.delegates import __version__
42
19setup(43setup(
20 name='lazr.delegates',44 name='lazr.delegates',
21 version='1.0b1',45 version=__version__,
22 namespace_packages=['lazr'],46 namespace_packages=['lazr'],
23 packages=find_packages('src'),47 packages=find_packages('src'),
24 package_dir={'':'src'},48 package_dir={'':'src'},
@@ -26,7 +50,7 @@
26 zip_safe=False,50 zip_safe=False,
27 maintainer='LAZR Developers',51 maintainer='LAZR Developers',
28 maintainer_email='lazr-developers@lists.launchpad.net',52 maintainer_email='lazr-developers@lists.launchpad.net',
29 description=open('README.txt').readlines()[0].strip(),53 description=open('README.txt').readline().strip(),
30 long_description=generate(54 long_description=generate(
31 'src/lazr/delegates/README.txt',55 'src/lazr/delegates/README.txt',
32 'src/lazr/delegates/CHANGES.txt'),56 'src/lazr/delegates/CHANGES.txt'),
@@ -36,10 +60,17 @@
36 'zope.interface',60 'zope.interface',
37 ],61 ],
38 url='https://launchpad.net/lazr.delegates',62 url='https://launchpad.net/lazr.delegates',
63 download_url= 'https://launchpad.net/lazr.delegates/+download',
39 classifiers=[64 classifiers=[
40 "Development Status :: 5 - Production/Stable",65 "Development Status :: 5 - Production/Stable",
41 "Intended Audience :: Developers",66 "Intended Audience :: Developers",
42 "License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)",67 "License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)",
43 "Operating System :: OS Independent",68 "Operating System :: OS Independent",
44 "Programming Language :: Python"],69 "Programming Language :: Python"],
70 extras_require=dict(
71 docs=['Sphinx',
72 'z3c.recipe.sphinxdoc']
73 ),
74 setup_requires=['eggtestinfo', 'setuptools_bzr'],
75 test_suite='lazr.delegates.tests',
45 )76 )
4677
=== modified file 'src/lazr/__init__.py'
--- src/lazr/__init__.py 2008-12-15 22:21:53 +0000
+++ src/lazr/__init__.py 2009-03-24 19:51:29 +0000
@@ -1,4 +1,18 @@
1# Copyright 2008 Canonical Ltd. All rights reserved.1# Copyright 2008 Canonical Ltd. All rights reserved.
2#
3# This file is part of lazr.delegates.
4#
5# lazr.delegates is free software: you can redistribute it and/or modify it
6# under the terms of the GNU Lesser General Public License as published by
7# the Free Software Foundation, version 3 of the License.
8#
9# lazr.delegates is distributed in the hope that it will be useful, but
10# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
11# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
12# License for more details.
13#
14# You should have received a copy of the GNU Lesser General Public License
15# along with lazr.delegates. If not, see <http://www.gnu.org/licenses/>.
216
3# this is a namespace package17# this is a namespace package
4try:18try:
519
=== modified file 'src/lazr/delegates/CHANGES.txt'
--- src/lazr/delegates/CHANGES.txt 2008-12-15 22:21:53 +0000
+++ src/lazr/delegates/CHANGES.txt 2009-03-24 19:51:29 +0000
@@ -2,7 +2,14 @@
2Changes2Changes
3=======3=======
44
51.0b1 (2008-12-08)51.0.1 (2009-03-24)
6==================6==================
77
8- specify only v3 of LGPL
9
10- build/developer improvements
11
121.0 (2008-12-19)
13================
14
8- Initial release15- Initial release
916
=== modified file 'src/lazr/delegates/README.txt'
--- src/lazr/delegates/README.txt 2008-12-15 22:21:53 +0000
+++ src/lazr/delegates/README.txt 2009-03-24 19:51:29 +0000
@@ -1,3 +1,18 @@
1..
2 This file is part of lazr.delegates.
3
4 lazr.delegates is free software: you can redistribute it and/or modify it
5 under the terms of the GNU Lesser General Public License as published by
6 the Free Software Foundation, version 3 of the License.
7
8 lazr.delegates is distributed in the hope that it will be useful, but
9 WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
10 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
11 License for more details.
12
13 You should have received a copy of the GNU Lesser General Public License
14 along with lazr.delegates. If not, see <http://www.gnu.org/licenses/>.
15
1The ``lazr.delegates`` Package16The ``lazr.delegates`` Package
2******************************17******************************
318
@@ -39,7 +54,7 @@
39 ... baz = 'hi baz!'54 ... baz = 'hi baz!'
4055
41SomeClass can implement IFoo by delegating to an instance of BaseFoo56SomeClass can implement IFoo by delegating to an instance of BaseFoo
42stored in the 'context' attribute. Note that ``delagates`` takes the57stored in the 'context' attribute. Note that ``delegates`` takes the
43interface as the argument. By default, 'context' is the attribute58interface as the argument. By default, 'context' is the attribute
44containing the object to which the interface implementation is59containing the object to which the interface implementation is
45delegated.60delegated.
@@ -170,3 +185,13 @@
170 Traceback (most recent call last):185 Traceback (most recent call last):
171 ...186 ...
172 NotImplementedError187 NotImplementedError
188
189===============
190Other Documents
191===============
192
193.. toctree::
194 :glob:
195
196 *
197 docs/*
173198
=== added file 'src/lazr/delegates/__init__.py'
--- src/lazr/delegates/__init__.py 1970-01-01 00:00:00 +0000
+++ src/lazr/delegates/__init__.py 2009-03-24 19:51:29 +0000
@@ -0,0 +1,30 @@
1# Copyright 2008 Canonical Ltd. All rights reserved.
2#
3# This file is part of lazr.delegates.
4#
5# lazr.delegates is free software: you can redistribute it and/or modify it
6# under the terms of the GNU Lesser General Public License as published by
7# the Free Software Foundation, version 3 of the License.
8#
9# lazr.delegates is distributed in the hope that it will be useful, but
10# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
11# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
12# License for more details.
13#
14# You should have received a copy of the GNU Lesser General Public License
15# along with lazr.delegates. If not, see <http://www.gnu.org/licenses/>.
16
17"""Decorator helpers that simplify class composition."""
18
19__version__ = 1.0
20
21# Re-export in such a way that __version__ can still be imported if
22# dependencies are not yet available.
23try:
24 # While we generally frown on "*" imports, this, combined with the fact we
25 # only test code from this module, means that we can verify what has been
26 # exported.
27 from lazr.delegates._delegates import *
28 from lazr.delegates._delegates import __all__
29except ImportError:
30 pass
031
=== renamed file 'src/lazr/delegates/__init__.py' => 'src/lazr/delegates/_delegates.py'
--- src/lazr/delegates/__init__.py 2008-12-15 22:21:53 +0000
+++ src/lazr/delegates/_delegates.py 2009-03-24 19:51:29 +0000
@@ -1,4 +1,18 @@
1# Copyright 2008 Canonical Ltd. All rights reserved.1# Copyright 2008 Canonical Ltd. All rights reserved.
2#
3# This file is part of lazr.delegates.
4#
5# lazr.delegates is free software: you can redistribute it and/or modify it
6# under the terms of the GNU Lesser General Public License as published by
7# the Free Software Foundation, version 3 of the License.
8#
9# lazr.delegates is distributed in the hope that it will be useful, but
10# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
11# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
12# License for more details.
13#
14# You should have received a copy of the GNU Lesser General Public License
15# along with lazr.delegates. If not, see <http://www.gnu.org/licenses/>.
216
3"""Decorator helpers that simplify class composition."""17"""Decorator helpers that simplify class composition."""
418
519
=== added directory 'src/lazr/delegates/tests'
=== added file 'src/lazr/delegates/tests/__init__.py'
--- src/lazr/delegates/tests/__init__.py 1970-01-01 00:00:00 +0000
+++ src/lazr/delegates/tests/__init__.py 2009-03-24 19:51:29 +0000
@@ -0,0 +1,16 @@
1# Copyright 2008 Canonical Ltd. All rights reserved.
2#
3# This file is part of lazr.delegates.
4#
5# lazr.delegates is free software: you can redistribute it and/or modify it
6# under the terms of the GNU Lesser General Public License as published by
7# the Free Software Foundation, version 3 of the License.
8#
9# lazr.delegates is distributed in the hope that it will be useful, but
10# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
11# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
12# License for more details.
13#
14# You should have received a copy of the GNU Lesser General Public License
15# along with lazr.delegates. If not, see <http://www.gnu.org/licenses/>.
16"""Tests for lazr.delegates"""
017
=== renamed file 'src/lazr/delegates/tests.py' => 'src/lazr/delegates/tests/test_docs.py'
--- src/lazr/delegates/tests.py 2008-12-15 22:21:53 +0000
+++ src/lazr/delegates/tests/test_docs.py 2009-03-24 19:51:29 +0000
@@ -1,17 +1,51 @@
1# Copyright 2008 Canonical Ltd. All rights reserved.1# Copyright 2008-2009 Canonical Ltd. All rights reserved.
2#
3# This file is part of lazr.delegates
4#
5# lazr.delegates is free software: you can redistribute it and/or modify it
6# under the terms of the GNU Lesser General Public License as published by
7# the Free Software Foundation, version 3 of the License.
8#
9# lazr.delegates is distributed in the hope that it will be useful, but
10# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
11# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
12# License for more details.
13#
14# You should have received a copy of the GNU Lesser General Public License
15# along with lazr.delegates. If not, see <http://www.gnu.org/licenses/>.
16"Test harness for doctests."
217
3"""Test harness."""18# pylint: disable-msg=E0611,W0142
419
5__metaclass__ = type20__metaclass__ = type
6__all__ = []21__all__ = [
22 'additional_tests',
23 ]
724
25import atexit
8import doctest26import doctest
27import os
28from pkg_resources import (
29 resource_filename, resource_exists, resource_listdir, cleanup_resources)
9import unittest30import unittest
1031
1132DOCTEST_FLAGS = (
12def test_suite():33 doctest.ELLIPSIS |
34 doctest.NORMALIZE_WHITESPACE |
35 doctest.REPORT_NDIFF)
36
37
38def additional_tests():
39 "Run the doc tests (README.txt and docs/*, if any exist)"
40 doctest_files = [
41 os.path.abspath(resource_filename('lazr.delegates', 'README.txt'))]
42 if resource_exists('lazr.delegates', 'docs'):
43 for name in resource_listdir('lazr.delegates', 'docs'):
44 if name.endswith('.txt'):
45 doctest_files.append(
46 os.path.abspath(
47 resource_filename('lazr.delegates', 'docs/%s' % name)))
48 kwargs = dict(module_relative=False, optionflags=DOCTEST_FLAGS)
49 atexit.register(cleanup_resources)
13 return unittest.TestSuite((50 return unittest.TestSuite((
14 doctest.DocFileSuite(51 doctest.DocFileSuite(*doctest_files, **kwargs)))
15 'README.txt',
16 optionflags=doctest.NORMALIZE_WHITESPACE,),
17 ))

Subscribers

People subscribed via source and target branches