Merge branch 'remove-old-entry-points' into features
This commit is contained in:
commit
48ac1a0986
|
@ -97,6 +97,11 @@
|
||||||
Example '-o xfail_strict=True'. A complete ini-options can be viewed
|
Example '-o xfail_strict=True'. A complete ini-options can be viewed
|
||||||
by py.test --help. Thanks `@blueyed`_ and `@fengxx`_ for the PR
|
by py.test --help. Thanks `@blueyed`_ and `@fengxx`_ for the PR
|
||||||
|
|
||||||
|
* Remove all py.test-X* entry points. The versioned, suffixed entry points
|
||||||
|
were never documented and a leftover from a pre-virtualenv era. These entry
|
||||||
|
points also created broken entry points in wheels, so removing them also
|
||||||
|
removes a source of confusion for users (`#1632`_).
|
||||||
|
Thanks `@obestwalter`_ for the PR.
|
||||||
|
|
||||||
**Changes**
|
**Changes**
|
||||||
|
|
||||||
|
@ -161,6 +166,7 @@
|
||||||
fixtures into one. Thanks to `@hpk42`_ and `@hackebrot`_.
|
fixtures into one. Thanks to `@hpk42`_ and `@hackebrot`_.
|
||||||
|
|
||||||
|
|
||||||
|
.. _#1632: https://github.com/pytest-dev/pytest/issues/1632
|
||||||
.. _#1580: https://github.com/pytest-dev/pytest/pull/1580
|
.. _#1580: https://github.com/pytest-dev/pytest/pull/1580
|
||||||
.. _#1605: https://github.com/pytest-dev/pytest/issues/1605
|
.. _#1605: https://github.com/pytest-dev/pytest/issues/1605
|
||||||
.. _#1597: https://github.com/pytest-dev/pytest/pull/1597
|
.. _#1597: https://github.com/pytest-dev/pytest/pull/1597
|
||||||
|
@ -174,6 +180,7 @@
|
||||||
.. _@Vogtinator: https://github.com/Vogtinator
|
.. _@Vogtinator: https://github.com/Vogtinator
|
||||||
.. _@blueyed: https://github.com/blueyed
|
.. _@blueyed: https://github.com/blueyed
|
||||||
.. _@fengxx: https://github.com/fengxx
|
.. _@fengxx: https://github.com/fengxx
|
||||||
|
.. _@obestwalter: https://github.com/obestwalter
|
||||||
|
|
||||||
* Fix `#1421`_: Exit tests if a collection error occurs and add
|
* Fix `#1421`_: Exit tests if a collection error occurs and add
|
||||||
``--continue-on-collection-errors`` option to restore previous behaviour.
|
``--continue-on-collection-errors`` option to restore previous behaviour.
|
||||||
|
|
26
setup.py
26
setup.py
|
@ -69,7 +69,8 @@ def main():
|
||||||
platforms=['unix', 'linux', 'osx', 'cygwin', 'win32'],
|
platforms=['unix', 'linux', 'osx', 'cygwin', 'win32'],
|
||||||
author='Holger Krekel, Bruno Oliveira, Ronny Pfannschmidt, Floris Bruynooghe, Brianna Laugher, Florian Bruhin and others',
|
author='Holger Krekel, Bruno Oliveira, Ronny Pfannschmidt, Floris Bruynooghe, Brianna Laugher, Florian Bruhin and others',
|
||||||
author_email='holger at merlinux.eu',
|
author_email='holger at merlinux.eu',
|
||||||
entry_points=make_entry_points(),
|
entry_points={'console_scripts':
|
||||||
|
['pytest=pytest:main', 'py.test=pytest:main']},
|
||||||
classifiers=classifiers,
|
classifiers=classifiers,
|
||||||
cmdclass={'test': PyTest},
|
cmdclass={'test': PyTest},
|
||||||
# the following should be enabled for release
|
# 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):
|
class PyTest(Command):
|
||||||
user_options = []
|
user_options = []
|
||||||
def initialize_options(self):
|
def initialize_options(self):
|
||||||
|
|
Loading…
Reference in New Issue