From 891e1677b68b2fccffb36110e544dd97467e3a1d Mon Sep 17 00:00:00 2001 From: Oliver Bestwalter Date: Sat, 25 Jun 2016 12:27:05 +0200 Subject: [PATCH 1/3] 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. --- setup.py | 26 ++------------------------ 1 file changed, 2 insertions(+), 24 deletions(-) diff --git a/setup.py b/setup.py index 6966fe1f2..bcc1f1766 100644 --- a/setup.py +++ b/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): From 72450408ed55bf4ed852a4df25b68ee41fca6433 Mon Sep 17 00:00:00 2001 From: Oliver Bestwalter Date: Sat, 25 Jun 2016 16:00:49 +0200 Subject: [PATCH 2/3] add changes in CHANGELOG.rst --- CHANGELOG.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index b5b6ec81d..804707f27 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -47,6 +47,11 @@ `#1629`_. Thanks `@obestwalter`_ and `@davehunt`_ for the complete PR (`#1633`_) +* Remove all py.test-X* entry points. The versioned, suffixed entry points + were never documented and a leftover from a pre-virtualenv era. They were + also broken for wheels, so removing these entry points also removes a + potential source of confusion. + **Changes** * Fixtures marked with ``@pytest.fixture`` can now use ``yield`` statements exactly like From 3a9e9fdf82f39e0dc9b6e60578ac2d22a93c7520 Mon Sep 17 00:00:00 2001 From: Oliver Bestwalter Date: Sat, 25 Jun 2016 16:04:23 +0200 Subject: [PATCH 3/3] rephrase changes in CHANGELOG.rst --- CHANGELOG.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 804707f27..3ab4c2228 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -48,9 +48,9 @@ (`#1633`_) * Remove all py.test-X* entry points. The versioned, suffixed entry points - were never documented and a leftover from a pre-virtualenv era. They were - also broken for wheels, so removing these entry points also removes a - potential source of confusion. + 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. **Changes**