2007-03-07 05:11:12 +08:00
|
|
|
|
|
|
|
# -*- coding: utf-8 -*-
|
2007-02-13 00:42:53 +08:00
|
|
|
"""
|
2009-05-21 22:16:22 +08:00
|
|
|
advanced testing and development support library:
|
2008-08-21 18:18:58 +08:00
|
|
|
|
|
|
|
- `py.test`_: cross-project testing tool with many advanced features
|
|
|
|
- `py.execnet`_: ad-hoc code distribution to SSH, Socket and local sub processes
|
|
|
|
- `py.path`_: path abstractions over local and subversion files
|
|
|
|
- `py.code`_: dynamic code compile and traceback printing support
|
|
|
|
|
2009-05-21 22:16:22 +08:00
|
|
|
Compatibility: Linux, Win32, OSX, Python versions 2.3-2.6.
|
|
|
|
For questions please check out http://pylib.org/contact.html
|
2008-08-21 18:18:58 +08:00
|
|
|
|
|
|
|
.. _`py.test`: http://pylib.org/test.html
|
|
|
|
.. _`py.execnet`: http://pylib.org/execnet.html
|
|
|
|
.. _`py.path`: http://pylib.org/path.html
|
|
|
|
.. _`py.code`: http://pylib.org/code.html
|
|
|
|
|
2007-01-24 22:24:01 +08:00
|
|
|
"""
|
2009-08-21 01:43:13 +08:00
|
|
|
from py.initpkg import initpkg
|
2009-08-20 22:41:44 +08:00
|
|
|
trunk = "trunk"
|
2007-01-24 22:24:01 +08:00
|
|
|
|
2009-08-06 20:49:55 +08:00
|
|
|
version = trunk or "1.0.1"
|
2007-01-24 22:24:01 +08:00
|
|
|
|
|
|
|
initpkg(__name__,
|
2009-05-21 22:16:22 +08:00
|
|
|
description = "py.test and pylib: advanced testing tool and networking lib",
|
2007-01-24 22:24:01 +08:00
|
|
|
version = version,
|
2008-08-18 23:08:39 +08:00
|
|
|
url = "http://pylib.org",
|
2007-01-24 22:24:01 +08:00
|
|
|
license = "MIT license",
|
2008-08-18 23:08:39 +08:00
|
|
|
platforms = ['unix', 'linux', 'osx', 'cygwin', 'win32'],
|
|
|
|
author = "holger krekel, Guido Wesdorp, Carl Friedrich Bolz, Armin Rigo, Maciej Fijalkowski & others",
|
|
|
|
author_email = "holger at merlinux.eu, py-dev at codespeak.net",
|
2007-01-24 22:24:01 +08:00
|
|
|
long_description = globals()['__doc__'],
|
2008-08-18 23:08:39 +08:00
|
|
|
classifiers = [
|
2009-08-04 18:02:38 +08:00
|
|
|
"Development Status :: 5 - Production/Stable",
|
2008-08-18 23:08:39 +08:00
|
|
|
"Intended Audience :: Developers",
|
|
|
|
"License :: OSI Approved :: MIT License",
|
|
|
|
"Operating System :: POSIX",
|
|
|
|
"Operating System :: Microsoft :: Windows",
|
|
|
|
"Operating System :: MacOS :: MacOS X",
|
|
|
|
"Topic :: Software Development :: Testing",
|
|
|
|
"Topic :: Software Development :: Libraries",
|
|
|
|
"Topic :: System :: Distributed Computing",
|
|
|
|
"Topic :: Utilities",
|
|
|
|
"Programming Language :: Python",
|
|
|
|
],
|
|
|
|
|
2007-02-11 19:53:42 +08:00
|
|
|
# EXPORTED API
|
2007-01-24 22:24:01 +08:00
|
|
|
exportdefs = {
|
2009-02-27 18:18:27 +08:00
|
|
|
|
|
|
|
# py lib events and plugins
|
2009-05-08 00:01:53 +08:00
|
|
|
'_com.Registry' : ('./_com.py', 'Registry'),
|
2009-02-27 18:18:27 +08:00
|
|
|
'_com.MultiCall' : ('./_com.py', 'MultiCall'),
|
2009-05-08 00:01:53 +08:00
|
|
|
'_com.comregistry' : ('./_com.py', 'comregistry'),
|
2009-08-10 05:51:25 +08:00
|
|
|
'_com.HookRelay' : ('./_com.py', 'HookRelay'),
|
2009-02-27 18:18:27 +08:00
|
|
|
|
2008-08-21 18:18:58 +08:00
|
|
|
# py lib cmdline tools
|
|
|
|
'cmdline.pytest' : ('./cmdline/pytest.py', 'main',),
|
|
|
|
'cmdline.pyrest' : ('./cmdline/pyrest.py', 'main',),
|
|
|
|
'cmdline.pylookup' : ('./cmdline/pylookup.py', 'main',),
|
|
|
|
'cmdline.pycountloc' : ('./cmdline/pycountloc.py', 'main',),
|
|
|
|
'cmdline.pycleanup' : ('./cmdline/pycleanup.py', 'main',),
|
2008-08-21 21:25:29 +08:00
|
|
|
'cmdline.pywhich' : ('./cmdline/pywhich.py', 'main',),
|
2008-09-17 16:50:04 +08:00
|
|
|
'cmdline.pysvnwcrevert' : ('./cmdline/pysvnwcrevert.py', 'main',),
|
2008-08-21 18:18:58 +08:00
|
|
|
|
2007-01-24 22:24:01 +08:00
|
|
|
# helpers for use from test functions or collectors
|
2007-02-04 22:27:10 +08:00
|
|
|
'test.__doc__' : ('./test/__init__.py', '__doc__'),
|
2009-04-09 22:21:07 +08:00
|
|
|
'test._PluginManager' : ('./test/pluginmanager.py', 'PluginManager'),
|
2008-08-16 23:26:59 +08:00
|
|
|
'test.raises' : ('./test/outcome.py', 'raises'),
|
|
|
|
'test.skip' : ('./test/outcome.py', 'skip'),
|
2008-09-21 23:15:28 +08:00
|
|
|
'test.importorskip' : ('./test/outcome.py', 'importorskip'),
|
2008-08-16 23:26:59 +08:00
|
|
|
'test.fail' : ('./test/outcome.py', 'fail'),
|
|
|
|
'test.exit' : ('./test/outcome.py', 'exit'),
|
2007-01-24 22:24:01 +08:00
|
|
|
|
|
|
|
# configuration/initialization related test api
|
2007-01-25 00:46:46 +08:00
|
|
|
'test.config' : ('./test/config.py', 'config_per_process'),
|
2007-01-24 22:24:01 +08:00
|
|
|
'test.ensuretemp' : ('./test/config.py', 'ensuretemp'),
|
|
|
|
'test.cmdline.main' : ('./test/cmdline.py', 'main'),
|
|
|
|
|
|
|
|
# for customization of collecting/running tests
|
|
|
|
'test.collect.Collector' : ('./test/collect.py', 'Collector'),
|
|
|
|
'test.collect.Directory' : ('./test/collect.py', 'Directory'),
|
2008-09-02 20:24:15 +08:00
|
|
|
'test.collect.File' : ('./test/collect.py', 'File'),
|
|
|
|
'test.collect.Item' : ('./test/collect.py', 'Item'),
|
2008-08-16 23:26:59 +08:00
|
|
|
'test.collect.Module' : ('./test/pycollect.py', 'Module'),
|
|
|
|
'test.collect.Class' : ('./test/pycollect.py', 'Class'),
|
|
|
|
'test.collect.Instance' : ('./test/pycollect.py', 'Instance'),
|
|
|
|
'test.collect.Generator' : ('./test/pycollect.py', 'Generator'),
|
|
|
|
'test.collect.Function' : ('./test/pycollect.py', 'Function'),
|
2009-05-22 01:36:02 +08:00
|
|
|
'test.collect._fillfuncargs' : ('./test/funcargs.py', 'fillfuncargs'),
|
2007-01-24 22:24:01 +08:00
|
|
|
|
|
|
|
# thread related API (still in early design phase)
|
|
|
|
'_thread.WorkerPool' : ('./thread/pool.py', 'WorkerPool'),
|
|
|
|
'_thread.NamedThreadPool' : ('./thread/pool.py', 'NamedThreadPool'),
|
|
|
|
'_thread.ThreadOut' : ('./thread/io.py', 'ThreadOut'),
|
|
|
|
|
|
|
|
# hook into the top-level standard library
|
|
|
|
'std' : ('./misc/std.py', 'std'),
|
|
|
|
|
2007-02-04 22:27:10 +08:00
|
|
|
'process.__doc__' : ('./process/__init__.py', '__doc__'),
|
2007-01-24 22:24:01 +08:00
|
|
|
'process.cmdexec' : ('./process/cmdexec.py', 'cmdexec'),
|
2008-09-23 22:28:13 +08:00
|
|
|
'process.kill' : ('./process/killproc.py', 'kill'),
|
2008-08-21 20:12:20 +08:00
|
|
|
'process.ForkedFunc' : ('./process/forkedfunc.py', 'ForkedFunc'),
|
2007-01-24 22:24:01 +08:00
|
|
|
|
2007-02-04 22:27:10 +08:00
|
|
|
# path implementation
|
|
|
|
'path.__doc__' : ('./path/__init__.py', '__doc__'),
|
2009-08-21 02:35:35 +08:00
|
|
|
'path.svnwc' : ('./path/svnwc.py', 'SvnWCCommandPath'),
|
|
|
|
'path.svnurl' : ('./path/svnurl.py', 'SvnCommandPath'),
|
2009-08-20 23:37:06 +08:00
|
|
|
'path.local' : ('./path/local.py', 'LocalPath'),
|
2009-08-21 02:35:35 +08:00
|
|
|
'path.SvnAuth' : ('./path/svnwc.py', 'SvnAuth'),
|
2007-01-24 22:24:01 +08:00
|
|
|
|
|
|
|
# some nice slightly magic APIs
|
2007-02-04 22:27:10 +08:00
|
|
|
'magic.__doc__' : ('./magic/__init__.py', '__doc__'),
|
2007-01-24 22:24:01 +08:00
|
|
|
'magic.invoke' : ('./magic/invoke.py', 'invoke'),
|
|
|
|
'magic.revoke' : ('./magic/invoke.py', 'revoke'),
|
|
|
|
'magic.patch' : ('./magic/patch.py', 'patch'),
|
|
|
|
'magic.revert' : ('./magic/patch.py', 'revert'),
|
|
|
|
'magic.autopath' : ('./magic/autopath.py', 'autopath'),
|
|
|
|
'magic.AssertionError' : ('./magic/assertion.py', 'AssertionError'),
|
|
|
|
|
|
|
|
# python inspection/code-generation API
|
2007-02-04 22:27:10 +08:00
|
|
|
'code.__doc__' : ('./code/__init__.py', '__doc__'),
|
2007-01-24 22:24:01 +08:00
|
|
|
'code.compile' : ('./code/source.py', 'compile_'),
|
|
|
|
'code.Source' : ('./code/source.py', 'Source'),
|
|
|
|
'code.Code' : ('./code/code.py', 'Code'),
|
|
|
|
'code.Frame' : ('./code/frame.py', 'Frame'),
|
|
|
|
'code.ExceptionInfo' : ('./code/excinfo.py', 'ExceptionInfo'),
|
|
|
|
'code.Traceback' : ('./code/traceback2.py', 'Traceback'),
|
2009-05-12 19:39:09 +08:00
|
|
|
'code.getfslineno' : ('./code/source.py', 'getfslineno'),
|
2007-01-24 22:24:01 +08:00
|
|
|
|
|
|
|
# backports and additions of builtins
|
2007-02-04 22:27:10 +08:00
|
|
|
'builtin.__doc__' : ('./builtin/__init__.py', '__doc__'),
|
2007-01-24 22:24:01 +08:00
|
|
|
'builtin.enumerate' : ('./builtin/enumerate.py', 'enumerate'),
|
|
|
|
'builtin.reversed' : ('./builtin/reversed.py', 'reversed'),
|
|
|
|
'builtin.sorted' : ('./builtin/sorted.py', 'sorted'),
|
|
|
|
'builtin.BaseException' : ('./builtin/exception.py', 'BaseException'),
|
2007-09-20 23:17:22 +08:00
|
|
|
'builtin.GeneratorExit' : ('./builtin/exception.py', 'GeneratorExit'),
|
2007-01-24 22:24:01 +08:00
|
|
|
'builtin.set' : ('./builtin/set.py', 'set'),
|
|
|
|
'builtin.frozenset' : ('./builtin/set.py', 'frozenset'),
|
|
|
|
|
|
|
|
# gateways into remote contexts
|
2007-02-04 22:27:10 +08:00
|
|
|
'execnet.__doc__' : ('./execnet/__init__.py', '__doc__'),
|
2009-05-08 00:01:53 +08:00
|
|
|
'execnet._HookSpecs' : ('./execnet/gateway.py', 'ExecnetAPI'),
|
2007-01-24 22:24:01 +08:00
|
|
|
'execnet.SocketGateway' : ('./execnet/register.py', 'SocketGateway'),
|
|
|
|
'execnet.PopenGateway' : ('./execnet/register.py', 'PopenGateway'),
|
|
|
|
'execnet.SshGateway' : ('./execnet/register.py', 'SshGateway'),
|
2009-03-20 23:36:45 +08:00
|
|
|
'execnet.XSpec' : ('./execnet/xspec.py', 'XSpec'),
|
|
|
|
'execnet.makegateway' : ('./execnet/xspec.py', 'makegateway'),
|
2009-03-20 01:05:41 +08:00
|
|
|
'execnet.MultiGateway' : ('./execnet/multi.py', 'MultiGateway'),
|
|
|
|
'execnet.MultiChannel' : ('./execnet/multi.py', 'MultiChannel'),
|
2007-01-24 22:24:01 +08:00
|
|
|
|
2007-01-25 00:46:46 +08:00
|
|
|
# execnet scripts
|
|
|
|
'execnet.RSync' : ('./execnet/rsync.py', 'RSync'),
|
|
|
|
|
2007-01-24 22:24:01 +08:00
|
|
|
# input-output helping
|
2007-02-04 22:27:10 +08:00
|
|
|
'io.__doc__' : ('./io/__init__.py', '__doc__'),
|
2007-01-24 22:24:01 +08:00
|
|
|
'io.dupfile' : ('./io/dupfile.py', 'dupfile'),
|
2007-02-01 23:20:39 +08:00
|
|
|
'io.FDCapture' : ('./io/fdcapture.py', 'FDCapture'),
|
|
|
|
'io.StdCapture' : ('./io/stdcapture.py', 'StdCapture'),
|
|
|
|
'io.StdCaptureFD' : ('./io/stdcapture.py', 'StdCaptureFD'),
|
2008-08-16 23:26:59 +08:00
|
|
|
'io.TerminalWriter' : ('./io/terminalwriter.py', 'TerminalWriter'),
|
2007-01-24 22:24:01 +08:00
|
|
|
|
|
|
|
# error module, defining all errno's as Classes
|
|
|
|
'error' : ('./misc/error.py', 'error'),
|
|
|
|
|
|
|
|
# small and mean xml/html generation
|
2007-02-04 22:27:10 +08:00
|
|
|
'xml.__doc__' : ('./xmlobj/__init__.py', '__doc__'),
|
2007-01-24 22:24:01 +08:00
|
|
|
'xml.html' : ('./xmlobj/html.py', 'html'),
|
|
|
|
'xml.Tag' : ('./xmlobj/xml.py', 'Tag'),
|
|
|
|
'xml.raw' : ('./xmlobj/xml.py', 'raw'),
|
|
|
|
'xml.Namespace' : ('./xmlobj/xml.py', 'Namespace'),
|
|
|
|
'xml.escape' : ('./xmlobj/misc.py', 'escape'),
|
|
|
|
|
|
|
|
# logging API ('producers' and 'consumers' connected via keywords)
|
2007-02-04 22:27:10 +08:00
|
|
|
'log.__doc__' : ('./log/__init__.py', '__doc__'),
|
2009-04-10 04:34:28 +08:00
|
|
|
'log._apiwarn' : ('./log/warning.py', '_apiwarn'),
|
2007-01-24 22:24:01 +08:00
|
|
|
'log.Producer' : ('./log/producer.py', 'Producer'),
|
|
|
|
'log.default' : ('./log/producer.py', 'default'),
|
|
|
|
'log._getstate' : ('./log/producer.py', '_getstate'),
|
|
|
|
'log._setstate' : ('./log/producer.py', '_setstate'),
|
|
|
|
'log.setconsumer' : ('./log/consumer.py', 'setconsumer'),
|
|
|
|
'log.Path' : ('./log/consumer.py', 'Path'),
|
|
|
|
'log.STDOUT' : ('./log/consumer.py', 'STDOUT'),
|
|
|
|
'log.STDERR' : ('./log/consumer.py', 'STDERR'),
|
|
|
|
'log.Syslog' : ('./log/consumer.py', 'Syslog'),
|
|
|
|
'log.get' : ('./log/logger.py', 'get'),
|
|
|
|
|
|
|
|
# compatibility modules (taken from 2.4.4)
|
2007-02-04 22:27:10 +08:00
|
|
|
'compat.__doc__' : ('./compat/__init__.py', '__doc__'),
|
2007-01-24 22:24:01 +08:00
|
|
|
'compat.doctest' : ('./compat/doctest.py', '*'),
|
|
|
|
'compat.optparse' : ('./compat/optparse.py', '*'),
|
|
|
|
'compat.textwrap' : ('./compat/textwrap.py', '*'),
|
|
|
|
'compat.subprocess' : ('./compat/subprocess.py', '*'),
|
|
|
|
})
|
2007-02-04 22:27:10 +08:00
|
|
|
|
2009-02-27 18:18:27 +08:00
|
|
|
|
|
|
|
|