@@ -69,7 +69,8 @@ def main():
69
69
platforms = ['unix' , 'linux' , 'osx' , 'cygwin' , 'win32' ],
70
70
author = 'Holger Krekel, Bruno Oliveira, Ronny Pfannschmidt, Floris Bruynooghe, Brianna Laugher, Florian Bruhin and others' ,
71
71
author_email = 'holger at merlinux.eu' ,
72
- entry_points = make_entry_points (),
72
+ entry_points = {'console_scripts' :
73
+ ['pytest=pytest:main' , 'py.test=pytest:main' ]},
73
74
classifiers = classifiers ,
74
75
cmdclass = {'test' : PyTest },
75
76
# the following should be enabled for release
@@ -81,29 +82,6 @@ def main():
81
82
)
82
83
83
84
84
- def cmdline_entrypoints (versioninfo , platform , basename ):
85
- target = 'pytest:main'
86
- if platform .startswith ('java' ):
87
- points = {'py.test-jython' : target }
88
- else :
89
- if basename .startswith ('pypy' ):
90
- points = {'py.test-%s' % basename : target }
91
- else : # cpython
92
- points = {'py.test-%s.%s' % versioninfo [:2 ] : target }
93
- points ['py.test' ] = target
94
- points ['pytest' ] = target
95
- return points
96
-
97
-
98
- def make_entry_points ():
99
- basename = os .path .basename (sys .executable )
100
- points = cmdline_entrypoints (sys .version_info , sys .platform , basename )
101
- keys = list (points .keys ())
102
- keys .sort ()
103
- l = ['%s = %s' % (x , points [x ]) for x in keys ]
104
- return {'console_scripts' : l }
105
-
106
-
107
85
class PyTest (Command ):
108
86
user_options = []
109
87
def initialize_options (self ):
0 commit comments