[Python-modules-commits] [pytest] 03/09: drop entrypoint logic as it missmatches setup time and wheel install time

Sebastian Ramacher sramacher at moszumanska.debian.org
Thu Jun 2 20:03:54 UTC 2016


This is an automated email from the git hooks/post-receive script.

sramacher pushed a commit to branch master
in repository pytest.

commit fbb23c4df1493b8ded70386e5ced1ab76e12c198
Author: Ronny Pfannschmidt <opensource at ronnypfannschmidt.de>
Date:   Mon Feb 15 21:50:17 2016 +0100

    drop entrypoint logic as it missmatches setup time and wheel install time
    
    Patch-Name: drop-entrypoint-logic.patch
---
 setup.py | 26 +++-----------------------
 1 file changed, 3 insertions(+), 23 deletions(-)

diff --git a/setup.py b/setup.py
index 7cdcdfb..8ba08da 100644
--- a/setup.py
+++ b/setup.py
@@ -69,7 +69,9 @@ 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': ['py.test = pytest:main']
+        },
         classifiers=classifiers,
         cmdclass={'test': PyTest},
         # the following should be enabled for release
@@ -81,28 +83,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
-    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):

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/pytest.git



More information about the Python-modules-commits mailing list