Merge lp:~cjwatson/lazr.lifecycle/tox into lp:lazr.lifecycle

Proposed by Colin Watson
Status: Merged
Merged at revision: 38
Proposed branch: lp:~cjwatson/lazr.lifecycle/tox
Merge into: lp:lazr.lifecycle
Prerequisite: lp:~cjwatson/lazr.lifecycle/zope.lifecycleevent-4.2.0-compat
Diff against target: 892 lines (+254/-460)
15 files modified
.bzrignore (+7/-9)
HACKING.rst (+1/-6)
MANIFEST.in (+3/-4)
NEWS.rst (+2/-1)
_bootstrap/COPYRIGHT.txt (+0/-9)
_bootstrap/LICENSE.txt (+0/-54)
_bootstrap/bootstrap.py (+0/-77)
buildout.cfg (+0/-31)
ez_setup.py (+0/-241)
setup.py (+11/-13)
src/lazr/lifecycle/docs/Makefile (+20/-0)
src/lazr/lifecycle/docs/conf.py (+168/-0)
src/lazr/lifecycle/docs/index.rst (+6/-2)
src/lazr/lifecycle/tests/test_docs.py (+18/-13)
tox.ini (+18/-0)
To merge this branch: bzr merge lp:~cjwatson/lazr.lifecycle/tox
Reviewer Review Type Date Requested Status
Ioana Lasc (community) Approve
LAZR Developers Pending
Review via email: mp+373725@code.launchpad.net

Commit message

Switch from buildout to tox.

To post a comment you must log in.
lp:~cjwatson/lazr.lifecycle/tox updated
38. By Colin Watson

Switch from buildout to tox.

39. By Colin Watson

Move NEWS.rst to the top level, where it's easier to find.

Revision history for this message
Ioana Lasc (ilasc) :
review: Approve
lp:~cjwatson/lazr.lifecycle/tox updated
40. By Colin Watson

Fix long description for PyPI.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file '.bzrignore'
2--- .bzrignore 2009-08-29 16:12:02 +0000
3+++ .bzrignore 2019-11-04 12:54:47 +0000
4@@ -1,12 +1,10 @@
5+*.egg-info
6+*.pyc
7+__pycache__
8+.tox
9 bin
10-develop-eggs
11-.installed.cfg
12-develop-eggs
13-parts
14-*.egg-info
15+build
16+dist
17 tags
18 TAGS
19-ID
20-build
21-*.egg
22-dist
23+src/lazr/lifecycle/docs/_build
24
25=== renamed file 'HACKING.txt' => 'HACKING.rst'
26--- HACKING.txt 2009-03-24 16:17:11 +0000
27+++ HACKING.rst 2019-11-04 12:54:47 +0000
28@@ -13,16 +13,11 @@
29 You should have received a copy of the GNU Lesser General Public License
30 along with lazr.lifecycle. If not, see <http://www.gnu.org/licenses/>.
31
32-This project uses zc.buildout for development.
33-
34 ============
35 Introduction
36 ============
37
38-These are guidelines for hacking on the lazr.lifecycle project. But first,
39-please see the common hacking guidelines at:
40-
41- http://dev.launchpad.net/Hacking
42+To run this project's tests, use `tox <https://tox.readthedocs.io/en/latest/>`.
43
44
45 Getting help
46
47=== modified file 'MANIFEST.in'
48--- MANIFEST.in 2009-08-29 16:09:41 +0000
49+++ MANIFEST.in 2019-11-04 12:54:47 +0000
50@@ -1,4 +1,3 @@
51-include ez_setup.py
52-recursive-include src *.txt *.pt *.zcml *.xsd
53-exclude MANIFEST.in buildout.cfg bootstrap.py .bzrignore
54-prune _bootstrap
55+include COPYING.txt HACKING.rst NEWS.rst
56+recursive-include src *.txt *.rst *.pt *.zcml *.xsd
57+exclude MANIFEST.in .bzrignore
58
59=== renamed file 'src/lazr/lifecycle/NEWS.txt' => 'NEWS.rst'
60--- src/lazr/lifecycle/NEWS.txt 2019-10-07 09:11:43 +0000
61+++ NEWS.rst 2019-11-04 12:54:47 +0000
62@@ -8,12 +8,13 @@
63 - Import IObjectEvent from zope.interface rather than zope.component.
64 - Add ObjectModifiedEvent.descriptions property, for compatibility with
65 zope.lifecycleevent >= 4.2.0.
66+- Switch from buildout to tox.
67
68 1.1 (2009-12-03)
69 ================
70
71 - Add IDoNotSnapshot and doNotSnapshot to allow the exclusion of
72-certain fields.
73+ certain fields.
74
75 1.0 (2009-08-31)
76 ================
77
78=== renamed file 'README.txt' => 'README.rst'
79=== removed directory '_bootstrap'
80=== removed file '_bootstrap/COPYRIGHT.txt'
81--- _bootstrap/COPYRIGHT.txt 2009-03-24 16:17:11 +0000
82+++ _bootstrap/COPYRIGHT.txt 1970-01-01 00:00:00 +0000
83@@ -1,9 +0,0 @@
84-Copyright (c) 2004-2009 Zope Corporation and Contributors.
85-All Rights Reserved.
86-
87-This software is subject to the provisions of the Zope Public License,
88-Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
89-THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
90-WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
91-WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
92-FOR A PARTICULAR PURPOSE.
93
94=== removed file '_bootstrap/LICENSE.txt'
95--- _bootstrap/LICENSE.txt 2009-03-24 16:17:11 +0000
96+++ _bootstrap/LICENSE.txt 1970-01-01 00:00:00 +0000
97@@ -1,54 +0,0 @@
98-Zope Public License (ZPL) Version 2.1
99--------------------------------------
100-
101-A copyright notice accompanies this license document that
102-identifies the copyright holders.
103-
104-This license has been certified as open source. It has also
105-been designated as GPL compatible by the Free Software
106-Foundation (FSF).
107-
108-Redistribution and use in source and binary forms, with or
109-without modification, are permitted provided that the
110-following conditions are met:
111-
112-1. Redistributions in source code must retain the
113- accompanying copyright notice, this list of conditions,
114- and the following disclaimer.
115-
116-2. Redistributions in binary form must reproduce the accompanying
117- copyright notice, this list of conditions, and the
118- following disclaimer in the documentation and/or other
119- materials provided with the distribution.
120-
121-3. Names of the copyright holders must not be used to
122- endorse or promote products derived from this software
123- without prior written permission from the copyright
124- holders.
125-
126-4. The right to distribute this software or to use it for
127- any purpose does not give you the right to use
128- Servicemarks (sm) or Trademarks (tm) of the copyright
129- holders. Use of them is covered by separate agreement
130- with the copyright holders.
131-
132-5. If any files are modified, you must cause the modified
133- files to carry prominent notices stating that you changed
134- the files and the date of any change.
135-
136-Disclaimer
137-
138- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS''
139- AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT
140- NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
141- AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
142- NO EVENT SHALL THE COPYRIGHT HOLDERS BE
143- LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
144- EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
145- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
146- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
147- HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
148- CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
149- OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
150- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
151- DAMAGE.
152\ No newline at end of file
153
154=== removed file '_bootstrap/bootstrap.py'
155--- _bootstrap/bootstrap.py 2009-03-24 16:17:11 +0000
156+++ _bootstrap/bootstrap.py 1970-01-01 00:00:00 +0000
157@@ -1,77 +0,0 @@
158-##############################################################################
159-#
160-# Copyright (c) 2006 Zope Corporation and Contributors.
161-# All Rights Reserved.
162-#
163-# This software is subject to the provisions of the Zope Public License,
164-# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
165-# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
166-# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
167-# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
168-# FOR A PARTICULAR PURPOSE.
169-#
170-##############################################################################
171-"""Bootstrap a buildout-based project
172-
173-Simply run this script in a directory containing a buildout.cfg.
174-The script accepts buildout command-line options, so you can
175-use the -c option to specify an alternate configuration file.
176-
177-$Id$
178-"""
179-
180-import os, shutil, sys, tempfile, urllib2
181-
182-tmpeggs = tempfile.mkdtemp()
183-
184-is_jython = sys.platform.startswith('java')
185-
186-try:
187- import pkg_resources
188-except ImportError:
189- ez = {}
190- exec urllib2.urlopen('http://peak.telecommunity.com/dist/ez_setup.py'
191- ).read() in ez
192- ez['use_setuptools'](to_dir=tmpeggs, download_delay=0)
193-
194- import pkg_resources
195-
196-if sys.platform == 'win32':
197- def quote(c):
198- if ' ' in c:
199- return '"%s"' % c # work around spawn lamosity on windows
200- else:
201- return c
202-else:
203- def quote (c):
204- return c
205-
206-cmd = 'from setuptools.command.easy_install import main; main()'
207-ws = pkg_resources.working_set
208-
209-if is_jython:
210- import subprocess
211-
212- assert subprocess.Popen([sys.executable] + ['-c', quote(cmd), '-mqNxd',
213- quote(tmpeggs), 'zc.buildout'],
214- env=dict(os.environ,
215- PYTHONPATH=
216- ws.find(pkg_resources.Requirement.parse('setuptools')).location
217- ),
218- ).wait() == 0
219-
220-else:
221- assert os.spawnle(
222- os.P_WAIT, sys.executable, quote (sys.executable),
223- '-c', quote (cmd), '-mqNxd', quote (tmpeggs), 'zc.buildout',
224- dict(os.environ,
225- PYTHONPATH=
226- ws.find(pkg_resources.Requirement.parse('setuptools')).location
227- ),
228- ) == 0
229-
230-ws.add_entry(tmpeggs)
231-ws.require('zc.buildout')
232-import zc.buildout.buildout
233-zc.buildout.buildout.main(sys.argv[1:] + ['bootstrap'])
234-shutil.rmtree(tmpeggs)
235
236=== removed symlink 'bootstrap.py'
237=== target was u'_bootstrap/bootstrap.py'
238=== removed file 'buildout.cfg'
239--- buildout.cfg 2009-03-24 16:23:51 +0000
240+++ buildout.cfg 1970-01-01 00:00:00 +0000
241@@ -1,31 +0,0 @@
242-[buildout]
243-parts =
244- interpreter
245- test
246- docs
247- tags
248-unzip = true
249-
250-develop = .
251-
252-[test]
253-recipe = zc.recipe.testrunner
254-eggs = lazr.lifecycle
255-defaults = '--tests-pattern ^tests --exit-with-status --suite-name additional_tests'.split()
256-
257-[docs]
258-recipe = z3c.recipe.sphinxdoc
259-eggs = lazr.lifecycle [docs]
260-index-doc = README
261-default.css =
262-layout.html =
263-
264-[interpreter]
265-recipe = zc.recipe.egg
266-interpreter=py
267-eggs = lazr.lifecycle
268- docutils
269-
270-[tags]
271-recipe = z3c.recipe.tag:tags
272-eggs = lazr.lifecycle
273
274=== removed file 'ez_setup.py'
275--- ez_setup.py 2009-03-24 16:17:11 +0000
276+++ ez_setup.py 1970-01-01 00:00:00 +0000
277@@ -1,241 +0,0 @@
278-#!python
279-"""Bootstrap setuptools installation
280-
281-If you want to use setuptools in your package's setup.py, just include this
282-file in the same directory with it, and add this to the top of your setup.py::
283-
284- from ez_setup import use_setuptools
285- use_setuptools()
286-
287-If you want to require a specific version of setuptools, set a download
288-mirror, or use an alternate download directory, you can do so by supplying
289-the appropriate options to ``use_setuptools()``.
290-
291-This file can also be run as a script to install or upgrade setuptools.
292-"""
293-import sys
294-DEFAULT_VERSION = "0.6c8"
295-DEFAULT_URL = "http://pypi.python.org/packages/%s/s/setuptools/" % sys.version[:3]
296-
297-md5_data = {
298- 'setuptools-0.6b1-py2.3.egg': '8822caf901250d848b996b7f25c6e6ca',
299- 'setuptools-0.6b1-py2.4.egg': 'b79a8a403e4502fbb85ee3f1941735cb',
300- 'setuptools-0.6b2-py2.3.egg': '5657759d8a6d8fc44070a9d07272d99b',
301- 'setuptools-0.6b2-py2.4.egg': '4996a8d169d2be661fa32a6e52e4f82a',
302- 'setuptools-0.6b3-py2.3.egg': 'bb31c0fc7399a63579975cad9f5a0618',
303- 'setuptools-0.6b3-py2.4.egg': '38a8c6b3d6ecd22247f179f7da669fac',
304- 'setuptools-0.6b4-py2.3.egg': '62045a24ed4e1ebc77fe039aa4e6f7e5',
305- 'setuptools-0.6b4-py2.4.egg': '4cb2a185d228dacffb2d17f103b3b1c4',
306- 'setuptools-0.6c1-py2.3.egg': 'b3f2b5539d65cb7f74ad79127f1a908c',
307- 'setuptools-0.6c1-py2.4.egg': 'b45adeda0667d2d2ffe14009364f2a4b',
308- 'setuptools-0.6c2-py2.3.egg': 'f0064bf6aa2b7d0f3ba0b43f20817c27',
309- 'setuptools-0.6c2-py2.4.egg': '616192eec35f47e8ea16cd6a122b7277',
310- 'setuptools-0.6c3-py2.3.egg': 'f181fa125dfe85a259c9cd6f1d7b78fa',
311- 'setuptools-0.6c3-py2.4.egg': 'e0ed74682c998bfb73bf803a50e7b71e',
312- 'setuptools-0.6c3-py2.5.egg': 'abef16fdd61955514841c7c6bd98965e',
313- 'setuptools-0.6c4-py2.3.egg': 'b0b9131acab32022bfac7f44c5d7971f',
314- 'setuptools-0.6c4-py2.4.egg': '2a1f9656d4fbf3c97bf946c0a124e6e2',
315- 'setuptools-0.6c4-py2.5.egg': '8f5a052e32cdb9c72bcf4b5526f28afc',
316- 'setuptools-0.6c5-py2.3.egg': 'ee9fd80965da04f2f3e6b3576e9d8167',
317- 'setuptools-0.6c5-py2.4.egg': 'afe2adf1c01701ee841761f5bcd8aa64',
318- 'setuptools-0.6c5-py2.5.egg': 'a8d3f61494ccaa8714dfed37bccd3d5d',
319- 'setuptools-0.6c6-py2.3.egg': '35686b78116a668847237b69d549ec20',
320- 'setuptools-0.6c6-py2.4.egg': '3c56af57be3225019260a644430065ab',
321- 'setuptools-0.6c6-py2.5.egg': 'b2f8a7520709a5b34f80946de5f02f53',
322- 'setuptools-0.6c7-py2.3.egg': '209fdf9adc3a615e5115b725658e13e2',
323- 'setuptools-0.6c7-py2.4.egg': '5a8f954807d46a0fb67cf1f26c55a82e',
324- 'setuptools-0.6c7-py2.5.egg': '45d2ad28f9750e7434111fde831e8372',
325- 'setuptools-0.6c8-py2.3.egg': '50759d29b349db8cfd807ba8303f1902',
326- 'setuptools-0.6c8-py2.4.egg': 'cba38d74f7d483c06e9daa6070cce6de',
327- 'setuptools-0.6c8-py2.5.egg': '1721747ee329dc150590a58b3e1ac95b',
328-}
329-
330-import sys, os
331-
332-def _validate_md5(egg_name, data):
333- if egg_name in md5_data:
334- from md5 import md5
335- digest = md5(data).hexdigest()
336- if digest != md5_data[egg_name]:
337- print >>sys.stderr, (
338- "md5 validation of %s failed! (Possible download problem?)"
339- % egg_name
340- )
341- sys.exit(2)
342- return data
343-
344-
345-def use_setuptools(
346- version=DEFAULT_VERSION, download_base=DEFAULT_URL, to_dir=os.curdir,
347- download_delay=15, min_version=None
348-):
349- """Automatically find/download setuptools and make it available on sys.path
350-
351- `version` should be a valid setuptools version number that is available
352- as an egg for download under the `download_base` URL (which should end with
353- a '/'). `to_dir` is the directory where setuptools will be downloaded, if
354- it is not already available. If `download_delay` is specified, it should
355- be the number of seconds that will be paused before initiating a download,
356- should one be required. If an older version of setuptools is installed,
357- this routine will print a message to ``sys.stderr`` and raise SystemExit in
358- an attempt to abort the calling script.
359- """
360- # Work around a hack in the ez_setup.py file from simplejson==1.7.3.
361- if min_version:
362- version = min_version
363-
364- was_imported = 'pkg_resources' in sys.modules or 'setuptools' in sys.modules
365- def do_download():
366- egg = download_setuptools(version, download_base, to_dir, download_delay)
367- sys.path.insert(0, egg)
368- import setuptools; setuptools.bootstrap_install_from = egg
369- try:
370- import pkg_resources
371- except ImportError:
372- return do_download()
373- try:
374- pkg_resources.require("setuptools>="+version); return
375- except pkg_resources.VersionConflict, e:
376- if was_imported:
377- print >>sys.stderr, (
378- "The required version of setuptools (>=%s) is not available, and\n"
379- "can't be installed while this script is running. Please install\n"
380- " a more recent version first, using 'easy_install -U setuptools'."
381- "\n\n(Currently using %r)"
382- ) % (version, e.args[0])
383- sys.exit(2)
384- else:
385- del pkg_resources, sys.modules['pkg_resources'] # reload ok
386- return do_download()
387- except pkg_resources.DistributionNotFound:
388- return do_download()
389-
390-def download_setuptools(
391- version=DEFAULT_VERSION, download_base=DEFAULT_URL, to_dir=os.curdir,
392- delay = 15
393-):
394- """Download setuptools from a specified location and return its filename
395-
396- `version` should be a valid setuptools version number that is available
397- as an egg for download under the `download_base` URL (which should end
398- with a '/'). `to_dir` is the directory where the egg will be downloaded.
399- `delay` is the number of seconds to pause before an actual download attempt.
400- """
401- import urllib2, shutil
402- egg_name = "setuptools-%s-py%s.egg" % (version,sys.version[:3])
403- url = download_base + egg_name
404- saveto = os.path.join(to_dir, egg_name)
405- src = dst = None
406- if not os.path.exists(saveto): # Avoid repeated downloads
407- try:
408- from distutils import log
409- if delay:
410- log.warn("""
411----------------------------------------------------------------------------
412-This script requires setuptools version %s to run (even to display
413-help). I will attempt to download it for you (from
414-%s), but
415-you may need to enable firewall access for this script first.
416-I will start the download in %d seconds.
417-
418-(Note: if this machine does not have network access, please obtain the file
419-
420- %s
421-
422-and place it in this directory before rerunning this script.)
423----------------------------------------------------------------------------""",
424- version, download_base, delay, url
425- ); from time import sleep; sleep(delay)
426- log.warn("Downloading %s", url)
427- src = urllib2.urlopen(url)
428- # Read/write all in one block, so we don't create a corrupt file
429- # if the download is interrupted.
430- data = _validate_md5(egg_name, src.read())
431- dst = open(saveto,"wb"); dst.write(data)
432- finally:
433- if src: src.close()
434- if dst: dst.close()
435- return os.path.realpath(saveto)
436-
437-def main(argv, version=DEFAULT_VERSION):
438- """Install or upgrade setuptools and EasyInstall"""
439- try:
440- import setuptools
441- except ImportError:
442- egg = None
443- try:
444- egg = download_setuptools(version, delay=0)
445- sys.path.insert(0,egg)
446- from setuptools.command.easy_install import main
447- return main(list(argv)+[egg]) # we're done here
448- finally:
449- if egg and os.path.exists(egg):
450- os.unlink(egg)
451- else:
452- if setuptools.__version__ == '0.0.1':
453- print >>sys.stderr, (
454- "You have an obsolete version of setuptools installed. Please\n"
455- "remove it from your system entirely before rerunning this script."
456- )
457- sys.exit(2)
458-
459- req = "setuptools>="+version
460- import pkg_resources
461- try:
462- pkg_resources.require(req)
463- except pkg_resources.VersionConflict:
464- try:
465- from setuptools.command.easy_install import main
466- except ImportError:
467- from easy_install import main
468- main(list(argv)+[download_setuptools(delay=0)])
469- sys.exit(0) # try to force an exit
470- else:
471- if argv:
472- from setuptools.command.easy_install import main
473- main(argv)
474- else:
475- print "Setuptools version",version,"or greater has been installed."
476- print '(Run "ez_setup.py -U setuptools" to reinstall or upgrade.)'
477-
478-def update_md5(filenames):
479- """Update our built-in md5 registry"""
480-
481- import re
482- from md5 import md5
483-
484- for name in filenames:
485- base = os.path.basename(name)
486- f = open(name,'rb')
487- md5_data[base] = md5(f.read()).hexdigest()
488- f.close()
489-
490- data = [" %r: %r,\n" % it for it in md5_data.items()]
491- data.sort()
492- repl = "".join(data)
493-
494- import inspect
495- srcfile = inspect.getsourcefile(sys.modules[__name__])
496- f = open(srcfile, 'rb'); src = f.read(); f.close()
497-
498- match = re.search("\nmd5_data = {\n([^}]+)}", src)
499- if not match:
500- print >>sys.stderr, "Internal error!"
501- sys.exit(2)
502-
503- src = src[:match.start(1)] + repl + src[match.end(1):]
504- f = open(srcfile,'w')
505- f.write(src)
506- f.close()
507-
508-
509-if __name__=='__main__':
510- if len(sys.argv)>2 and sys.argv[1]=='--md5update':
511- update_md5(sys.argv[2:])
512- else:
513- main(sys.argv[1:])
514-
515-
516-
517-
518-
519
520=== modified file 'setup.py'
521--- setup.py 2019-08-21 12:10:12 +0000
522+++ setup.py 2019-11-04 12:54:47 +0000
523@@ -16,20 +16,19 @@
524 # You should have received a copy of the GNU Lesser General Public License
525 # along with lazr.lifecycle. If not, see <http://www.gnu.org/licenses/>.
526
527-import ez_setup
528-ez_setup.use_setuptools()
529-
530-import sys
531 from setuptools import setup, find_packages
532
533 # generic helpers primarily for the long_description
534 def generate(*docname_or_string):
535+ marker = '.. pypi description ends here'
536 res = []
537 for value in docname_or_string:
538- if value.endswith('.txt'):
539- f = open(value)
540- value = f.read()
541- f.close()
542+ if value.endswith('.rst'):
543+ with open(value) as f:
544+ value = f.read()
545+ idx = value.find(marker)
546+ if idx >= 0:
547+ value = value[:idx]
548 res.append(value)
549 if not value.endswith('\n'):
550 res.append('')
551@@ -48,10 +47,10 @@
552 zip_safe=False,
553 maintainer='LAZR Developers',
554 maintainer_email='lazr-developers@lists.launchpad.net',
555- description=open('README.txt').readline().strip(),
556+ description=open('README.rst').readline().strip(),
557 long_description=generate(
558- 'src/lazr/lifecycle/README.txt',
559- 'src/lazr/lifecycle/NEWS.txt'),
560+ 'src/lazr/lifecycle/docs/index.rst',
561+ 'NEWS.rst'),
562 license='LGPL v3',
563 install_requires=[
564 'setuptools',
565@@ -69,8 +68,7 @@
566 "Operating System :: OS Independent",
567 "Programming Language :: Python"],
568 extras_require=dict(
569- docs=['Sphinx',
570- 'z3c.recipe.sphinxdoc']
571+ docs=['Sphinx'],
572 ),
573 test_suite='lazr.lifecycle.tests',
574 )
575
576=== added file 'src/lazr/lifecycle/docs/Makefile'
577--- src/lazr/lifecycle/docs/Makefile 1970-01-01 00:00:00 +0000
578+++ src/lazr/lifecycle/docs/Makefile 2019-11-04 12:54:47 +0000
579@@ -0,0 +1,20 @@
580+# Minimal makefile for Sphinx documentation
581+#
582+
583+# You can set these variables from the command line.
584+SPHINXOPTS =
585+SPHINXBUILD = sphinx-build
586+SPHINXPROJ = lazrlifecycle
587+SOURCEDIR = .
588+BUILDDIR = _build
589+
590+# Put it first so that "make" without argument is like "make help".
591+help:
592+ @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
593+
594+.PHONY: help Makefile
595+
596+# Catch-all target: route all unknown targets to Sphinx using the new
597+# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
598+%: Makefile
599+ @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
600\ No newline at end of file
601
602=== added symlink 'src/lazr/lifecycle/docs/NEWS.rst'
603=== target is u'../../../../NEWS.rst'
604=== added file 'src/lazr/lifecycle/docs/conf.py'
605--- src/lazr/lifecycle/docs/conf.py 1970-01-01 00:00:00 +0000
606+++ src/lazr/lifecycle/docs/conf.py 2019-11-04 12:54:47 +0000
607@@ -0,0 +1,168 @@
608+# -*- coding: utf-8 -*-
609+#
610+# lazr.lifecycle documentation build configuration file, created by
611+# sphinx-quickstart on Wed Aug 21 12:58:44 2019.
612+#
613+# This file is execfile()d with the current directory set to its
614+# containing dir.
615+#
616+# Note that not all possible configuration values are present in this
617+# autogenerated file.
618+#
619+# All configuration values have a default; values that are commented out
620+# serve to show the default.
621+
622+# If extensions (or modules to document with autodoc) are in another directory,
623+# add these directories to sys.path here. If the directory is relative to the
624+# documentation root, use os.path.abspath to make it absolute, like shown here.
625+#
626+# import os
627+# import sys
628+# sys.path.insert(0, os.path.abspath('.'))
629+
630+
631+# -- General configuration ------------------------------------------------
632+
633+# If your documentation needs a minimal Sphinx version, state it here.
634+#
635+# needs_sphinx = '1.0'
636+
637+# Add any Sphinx extension module names here, as strings. They can be
638+# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
639+# ones.
640+extensions = []
641+
642+# Add any paths that contain templates here, relative to this directory.
643+templates_path = ['_templates']
644+
645+# The suffix(es) of source filenames.
646+# You can specify multiple suffix as a list of string:
647+#
648+# source_suffix = ['.rst', '.md']
649+source_suffix = '.rst'
650+
651+# The master toctree document.
652+master_doc = 'index'
653+
654+# General information about the project.
655+project = u'lazr.lifecycle'
656+copyright = u'2019, LAZR Developers <lazr-developers@lists.launchpad.net>'
657+author = u'LAZR Developers <lazr-developers@lists.launchpad.net>'
658+
659+# The version info for the project you're documenting, acts as replacement for
660+# |version| and |release|, also used in various other places throughout the
661+# built documents.
662+#
663+# The short X.Y version.
664+version = u''
665+# The full version, including alpha/beta/rc tags.
666+release = u''
667+
668+# The language for content autogenerated by Sphinx. Refer to documentation
669+# for a list of supported languages.
670+#
671+# This is also used if you do content translation via gettext catalogs.
672+# Usually you set "language" from the command line for these cases.
673+language = None
674+
675+# List of patterns, relative to source directory, that match files and
676+# directories to ignore when looking for source files.
677+# This patterns also effect to html_static_path and html_extra_path
678+exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
679+
680+# The name of the Pygments (syntax highlighting) style to use.
681+pygments_style = 'sphinx'
682+
683+# If true, `todo` and `todoList` produce output, else they produce nothing.
684+todo_include_todos = False
685+
686+
687+# -- Options for HTML output ----------------------------------------------
688+
689+# The theme to use for HTML and HTML Help pages. See the documentation for
690+# a list of builtin themes.
691+#
692+html_theme = 'alabaster'
693+
694+# Theme options are theme-specific and customize the look and feel of a theme
695+# further. For a list of options available for each theme, see the
696+# documentation.
697+#
698+# html_theme_options = {}
699+
700+# Add any paths that contain custom static files (such as style sheets) here,
701+# relative to this directory. They are copied after the builtin static files,
702+# so a file named "default.css" will overwrite the builtin "default.css".
703+html_static_path = ['_static']
704+
705+# Custom sidebar templates, must be a dictionary that maps document names
706+# to template names.
707+#
708+# This is required for the alabaster theme
709+# refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars
710+html_sidebars = {
711+ '**': [
712+ 'relations.html', # needs 'show_related': True theme option to display
713+ 'searchbox.html',
714+ ]
715+}
716+
717+
718+# -- Options for HTMLHelp output ------------------------------------------
719+
720+# Output file base name for HTML help builder.
721+htmlhelp_basename = 'lazrlifecycledoc'
722+
723+
724+# -- Options for LaTeX output ---------------------------------------------
725+
726+latex_elements = {
727+ # The paper size ('letterpaper' or 'a4paper').
728+ #
729+ # 'papersize': 'letterpaper',
730+
731+ # The font size ('10pt', '11pt' or '12pt').
732+ #
733+ # 'pointsize': '10pt',
734+
735+ # Additional stuff for the LaTeX preamble.
736+ #
737+ # 'preamble': '',
738+
739+ # Latex figure (float) alignment
740+ #
741+ # 'figure_align': 'htbp',
742+}
743+
744+# Grouping the document tree into LaTeX files. List of tuples
745+# (source start file, target name, title,
746+# author, documentclass [howto, manual, or own class]).
747+latex_documents = [
748+ (master_doc, 'lazrlifecycle.tex', u'lazr.lifecycle Documentation',
749+ u'LAZR Developers \\textless{}lazr-developers@lists.launchpad.net\\textgreater{}', 'manual'),
750+]
751+
752+
753+# -- Options for manual page output ---------------------------------------
754+
755+# One entry per manual page. List of tuples
756+# (source start file, name, description, authors, manual section).
757+man_pages = [
758+ (master_doc, 'lazrlifecycle', u'lazr.lifecycle Documentation',
759+ [author], 1)
760+]
761+
762+
763+# -- Options for Texinfo output -------------------------------------------
764+
765+# Grouping the document tree into Texinfo files. List of tuples
766+# (source start file, target name, title, author,
767+# dir menu entry, description, category)
768+texinfo_documents = [
769+ (master_doc, 'lazrlifecycle', u'lazr.lifecycle Documentation',
770+ author, 'lazrlifecycle', 'One line description of project.',
771+ 'Miscellaneous'),
772+]
773+
774+
775+
776
777=== renamed file 'src/lazr/lifecycle/docs/event.txt' => 'src/lazr/lifecycle/docs/event.rst'
778=== renamed file 'src/lazr/lifecycle/README.txt' => 'src/lazr/lifecycle/docs/index.rst'
779--- src/lazr/lifecycle/README.txt 2009-03-24 16:23:51 +0000
780+++ src/lazr/lifecycle/docs/index.rst 2019-11-04 12:54:47 +0000
781@@ -26,11 +26,15 @@
782 The module also contains Snapshot support to save the state of an object for
783 notification, and to compute deltas between version of objects.
784
785+.. pypi description ends here
786+
787 Other documents
788 ===============
789
790 .. toctree::
791 :glob:
792
793- *
794- docs/*
795+ event
796+ object-delta
797+ snapshot
798+ NEWS
799
800=== renamed file 'src/lazr/lifecycle/docs/object-delta.txt' => 'src/lazr/lifecycle/docs/object-delta.rst'
801=== renamed file 'src/lazr/lifecycle/docs/snapshot.txt' => 'src/lazr/lifecycle/docs/snapshot.rst'
802=== modified file 'src/lazr/lifecycle/tests/test_docs.py'
803--- src/lazr/lifecycle/tests/test_docs.py 2009-03-24 16:17:11 +0000
804+++ src/lazr/lifecycle/tests/test_docs.py 2019-11-04 12:54:47 +0000
805@@ -19,7 +19,7 @@
806
807 __metaclass__ = type
808 __all__ = [
809- 'additional_tests',
810+ 'load_tests',
811 ]
812
813 import atexit
814@@ -27,7 +27,6 @@
815 import os
816 from pkg_resources import (
817 resource_filename, resource_exists, resource_listdir, cleanup_resources)
818-import unittest
819 import warnings
820
821 DOCTEST_FLAGS = (
822@@ -44,30 +43,36 @@
823
824 print "%s: %s" % (kind, message)
825
826+
827 def setUp(test):
828 """Makes any warning an error."""
829 test.globs['saved_warn'] = warnings.warn
830 warnings.warn = raise_warning
831
832+
833 def tearDown(test):
834 """Reset the warnings."""
835 warnings.warn = test.globs['saved_warn']
836
837
838-def additional_tests():
839- "Run the doc tests (README.txt and docs/*, if any exist)"
840- doctest_files = [
841- os.path.abspath(resource_filename('lazr.lifecycle', 'README.txt'))]
842+def find_doctests(suffix):
843+ """Find doctests matching a certain suffix."""
844+ doctest_files = []
845+ # Match doctests against the suffix.
846 if resource_exists('lazr.lifecycle', 'docs'):
847 for name in resource_listdir('lazr.lifecycle', 'docs'):
848- if name.endswith('.txt'):
849+ if name.endswith(suffix):
850 doctest_files.append(
851 os.path.abspath(
852 resource_filename('lazr.lifecycle', 'docs/%s' % name)))
853- kwargs = dict(
854- setUp=setUp, tearDown=tearDown,
855- module_relative=False,
856- optionflags=DOCTEST_FLAGS)
857+ return doctest_files
858+
859+
860+def load_tests(loader, tests, pattern):
861+ """Load all the doctests."""
862 atexit.register(cleanup_resources)
863- return unittest.TestSuite((
864- doctest.DocFileSuite(*doctest_files, **kwargs)))
865+ tests.addTest(doctest.DocFileSuite(
866+ *find_doctests('.rst'),
867+ module_relative=False, setUp=setUp, tearDown=tearDown,
868+ optionflags=DOCTEST_FLAGS))
869+ return tests
870
871=== added file 'tox.ini'
872--- tox.ini 1970-01-01 00:00:00 +0000
873+++ tox.ini 2019-11-04 12:54:47 +0000
874@@ -0,0 +1,18 @@
875+[tox]
876+envlist =
877+ py27,docs
878+
879+[testenv]
880+commands =
881+ zope-testrunner --test-path src --tests-pattern ^tests {posargs}
882+deps =
883+ .[test]
884+ zope.testrunner
885+
886+[testenv:docs]
887+basepython =
888+ python2.7
889+commands =
890+ sphinx-build -b html -d src/lazr/lifecycle/docs/_build/doctrees src/lazr/lifecycle/docs src/lazr/lifecycle/docs/_build/html
891+deps =
892+ .[docs]

Subscribers

People subscribed via source and target branches