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
|
|
|
|
2010-01-11 05:10:45 +08:00
|
|
|
.. _`py.test`: http://pytest.org
|
2008-08-21 18:18:58 +08:00
|
|
|
.. _`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
|
|
|
"""
|
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-04-22 22:51:42 +08:00
|
|
|
version= '1.2.2',
|
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',
|
2010-01-14 00:15:54 +08:00
|
|
|
'py._plugin',
|
|
|
|
'py._cmdline',
|
|
|
|
'py._code',
|
|
|
|
'py._compat',
|
|
|
|
'py._io',
|
|
|
|
'py._log',
|
|
|
|
'py._path',
|
|
|
|
'py._process',
|
|
|
|
'py._test',
|
2009-11-05 04:34:07 +08:00
|
|
|
],
|
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):
|
2010-01-03 21:19:31 +08:00
|
|
|
if platform.startswith('java'):
|
2009-12-24 02:58:52 +08:00
|
|
|
points = {'py.test-jython': 'py.cmdline:pytest',
|
|
|
|
'py.which-jython': 'py.cmdline:pywhich'}
|
2010-01-03 21:19:31 +08:00
|
|
|
else:
|
|
|
|
if basename.startswith("pypy"):
|
|
|
|
points = {'py.test-%s' % basename: 'py.cmdline:pytest',
|
|
|
|
'py.which-%s' % basename: '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('.','')
|
2009-12-24 02:58:52 +08:00
|
|
|
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
|
|
|
|