Package: python-setuptools / 33.1.1-1

multiple-entrypoints.diff Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# this patch is currently not used, not providing entry points for all interpreters

Index: b/setup.py
===================================================================
--- a/setup.py
+++ b/setup.py
@@ -41,8 +41,17 @@ def _gen_console_scripts():
     )
     if any(os.environ.get(var) not in (None, "", "0") for var in var_names):
         return
-    yield ("easy_install-{shortver} = setuptools.command.easy_install:main"
-        .format(shortver=sys.version[:3]))
+    if sys.version_info[0] < 3 and 'XPYVERSISONS' in os.environ:
+        for version in os.environ['XPYVERSIONS'].split():
+            yield ("easy_install-{shortver} = setuptools.command.easy_install:main"
+                   .format(shortver=version))
+    elif sys.version_info[0] >= 3 and 'XPY3VERSIONS' in os.environ:
+        for version in os.environ['XPY3VERSIONS'].split():
+            yield ("easy_install-{shortver} = setuptools.command.easy_install:main"
+                   .format(shortver=version))
+    else:
+        yield ("easy_install-{shortver} = setuptools.command.easy_install:main"
+               .format(shortver=sys.version[:3]))
 
 
 readme_path = os.path.join(here, 'README.rst')