Remove all py.test-X* entry points.
The versioned, suffixed entry points are not documented and a leftover from a pre-virtualenv world. They also are broken for wheels.
This commit is contained in:
parent
db79ed5c4d
commit
891e1677b6
26
setup.py
26
setup.py
|
@ -69,7 +69,8 @@ def main():
|
|||
platforms=['unix', 'linux', 'osx', 'cygwin', 'win32'],
|
||||
author='Holger Krekel, Bruno Oliveira, Ronny Pfannschmidt, Floris Bruynooghe, Brianna Laugher, Florian Bruhin and others',
|
||||
author_email='holger at merlinux.eu',
|
||||
entry_points=make_entry_points(),
|
||||
entry_points={'console_scripts':
|
||||
['pytest=pytest:main', 'py.test=pytest:main']},
|
||||
classifiers=classifiers,
|
||||
cmdclass={'test': PyTest},
|
||||
# the following should be enabled for release
|
||||
|
@ -81,29 +82,6 @@ def main():
|
|||
)
|
||||
|
||||
|
||||
def cmdline_entrypoints(versioninfo, platform, basename):
|
||||
target = 'pytest:main'
|
||||
if platform.startswith('java'):
|
||||
points = {'py.test-jython': target}
|
||||
else:
|
||||
if basename.startswith('pypy'):
|
||||
points = {'py.test-%s' % basename: target}
|
||||
else: # cpython
|
||||
points = {'py.test-%s.%s' % versioninfo[:2] : target}
|
||||
points['py.test'] = target
|
||||
points['pytest'] = target
|
||||
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}
|
||||
|
||||
|
||||
class PyTest(Command):
|
||||
user_options = []
|
||||
def initialize_options(self):
|
||||
|
|
Loading…
Reference in New Issue