2009-10-03 07:47:39 +08:00
|
|
|
"""py lib / py.test setup.py file"""
|
2008-08-18 23:08:39 +08:00
|
|
|
import os, sys
|
2009-10-29 19:45:12 +08:00
|
|
|
if sys.version_info >= (3,0):
|
|
|
|
from distribute_setup import use_setuptools
|
|
|
|
use_setuptools()
|
2009-06-24 22:20:14 +08:00
|
|
|
from setuptools import setup
|
2008-08-21 18:18:58 +08:00
|
|
|
|
2009-10-29 19:45:12 +08:00
|
|
|
long_description = """
|
2009-10-03 07:47:39 +08:00
|
|
|
py.test and pylib: rapid testing and development utils
|
2008-08-21 18:18:58 +08:00
|
|
|
|
|
|
|
- `py.test`_: cross-project testing tool with many advanced features
|
2009-10-02 22:58:57 +08:00
|
|
|
- `py.path`_: path abstractions over local and subversion files
|
2008-08-21 18:18:58 +08:00
|
|
|
- `py.code`_: dynamic code compile and traceback printing support
|
|
|
|
|
2009-10-29 19:45:12 +08:00
|
|
|
Platforms: Linux, Win32, OSX
|
|
|
|
Interpreters: Python versions 2.4 through to 3.1, Jython 2.5.1.
|
2009-06-18 03:08:19 +08:00
|
|
|
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.path`: http://pylib.org/path.html
|
|
|
|
.. _`py.code`: http://pylib.org/code.html
|
|
|
|
|
2010-01-03 18:42:26 +08:00
|
|
|
(c) Holger Krekel and others, 2004-2010
|
2008-08-21 18:18:58 +08:00
|
|
|
"""
|
2009-10-03 07:11:04 +08:00
|
|
|
trunk = None
|
2008-08-18 23:08:39 +08:00
|
|
|
def main():
|
2008-08-21 18:18:58 +08:00
|
|
|
setup(
|
2008-08-18 23:08:39 +08:00
|
|
|
name='py',
|
2009-10-03 07:47:39 +08:00
|
|
|
description='py.test and pylib: rapid testing and development utils.',
|
|
|
|
long_description = long_description,
|
2010-01-03 18:42:26 +08:00
|
|
|
version= trunk or '1.2.0a1',
|
2009-10-03 07:47:39 +08:00
|
|
|
url='http://pylib.org',
|
2008-08-18 23:08:39 +08:00
|
|
|
license='MIT license',
|
2009-10-03 07:47:39 +08:00
|
|
|
platforms=['unix', 'linux', 'osx', 'cygwin', 'win32'],
|
2008-08-18 23:08:39 +08:00
|
|
|
author='holger krekel, Guido Wesdorp, Carl Friedrich Bolz, Armin Rigo, Maciej Fijalkowski & others',
|
2009-10-03 07:47:39 +08:00
|
|
|
author_email='holger at merlinux.eu',
|
2009-12-24 02:58:52 +08:00
|
|
|
entry_points= make_entry_points(),
|
2009-11-05 10:18:55 +08:00
|
|
|
classifiers=['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 :: Utilities',
|
|
|
|
'Programming Language :: Python'],
|
2009-06-25 00:02:41 +08:00
|
|
|
packages=['py',
|
2009-11-05 04:34:07 +08:00
|
|
|
'py.plugin',
|
|
|
|
'py.impl',
|
|
|
|
'py.impl.cmdline',
|
|
|
|
'py.impl.code',
|
|
|
|
'py.impl.compat',
|
|
|
|
'py.impl.io',
|
|
|
|
'py.impl.log',
|
|
|
|
'py.impl.path',
|
|
|
|
'py.impl.process',
|
|
|
|
'py.impl.test',
|
|
|
|
'py.impl.test.dist',
|
|
|
|
'py.impl.test.looponfail',
|
|
|
|
],
|
2009-10-29 19:45:12 +08:00
|
|
|
zip_safe=False,
|
2008-08-18 23:08:39 +08:00
|
|
|
)
|
|
|
|
|
2009-12-24 02:58:52 +08:00
|
|
|
def cmdline_entrypoints(versioninfo, platform, basename):
|
|
|
|
if basename.startswith("pypy"):
|
|
|
|
points = {'py.test-%s' % basename: 'py.cmdline:pytest',
|
|
|
|
'py.which-%s' % basename: 'py.cmdline:pywhich',}
|
|
|
|
elif platform.startswith('java'):
|
|
|
|
points = {'py.test-jython': 'py.cmdline:pytest',
|
|
|
|
'py.which-jython': 'py.cmdline:pywhich'}
|
|
|
|
else: # cpython
|
|
|
|
points = {
|
|
|
|
'py.test-%s.%s' % versioninfo[:2] : 'py.cmdline:pytest',
|
|
|
|
'py.which-%s.%s' % versioninfo[:2] : 'py.cmdline:pywhich'
|
|
|
|
}
|
|
|
|
for x in ['py.cleanup', 'py.convert_unittest', 'py.countloc',
|
|
|
|
'py.lookup', 'py.svnwcrevert', 'py.which', 'py.test']:
|
|
|
|
points[x] = "py.cmdline:%s" % x.replace('.','')
|
|
|
|
return points
|
|
|
|
|
|
|
|
def make_entry_points():
|
|
|
|
basename = os.path.basename(sys.executable)
|
|
|
|
points = cmdline_entrypoints(sys.version_info, sys.platform, basename)
|
|
|
|
keys = list(points.keys())
|
|
|
|
keys.sort()
|
|
|
|
l = ["%s = %s" % (x, points[x]) for x in keys]
|
|
|
|
return {'console_scripts': l}
|
|
|
|
|
2008-08-18 23:08:39 +08:00
|
|
|
if __name__ == '__main__':
|
|
|
|
main()
|
2009-10-03 07:47:39 +08:00
|
|
|
|