Repository: pypa/setuptools

Issue:
Remove dual-version advertisement on PyPI
Originally reported by: **thomas-guettler (Bitbucket: [thomas-guettler](http://bitbucket.org/thomas-guettler), GitHub: Unknown)**

---

https://pypi.python.org/pypi/setuptools

the above page is too empty. Please add a  link to bitbucket and a link to docs.

Thank you

---
- Bitbucket: https://bitbucket.org/pypa/setuptools/issue/88



Discussion:
_Original comment by_ **jaraco (Bitbucket: [jaraco](http://bitbucket.org/jaraco), GitHub: [jaraco](http://github.com/jaraco))**:

---

Setuptools 1.1 is now officially the only advertised version.

_Original comment by_ **jaraco (Bitbucket: [jaraco](http://bitbucket.org/jaraco), GitHub: [jaraco](http://github.com/jaraco))**:

---

Hi Thomas. Setuptools currently advertises both the 0.6 version of Setuptools and the latest releases in order to support a smoother transition for those users of Setuptools 0.6 that never used Distribute. The result of this dual-version advertisement is that the main page as you referenced may only contain simple links to the various versions.

However, I believe the transitional needs for Setuptools have met their goals and so I'm shifting the topic of this report to suggest that we can remove that requirement and advertize only the latest version as most packages typically do. Once that's done, the default README, which links to the docs and whose docs link to development should fulfill your request.


Resolving patch:
diff --git a/setuptools/_distutils/command/install.py b/setuptools/_distutils/command/install.py
--- a/setuptools/_distutils/command/install.py
+++ b/setuptools/_distutils/command/install.py
@@ -81,11 +81,6 @@
         'data'   : '{userbase}',
         }
 
-    INSTALL_SCHEMES['osx_framework_user'] = {
-        'headers':
-            '{userbase}/include/{implementation_lower}{py_version_short}{abiflags}/{dist_name}',
-    }
-
 # The keys to an installation scheme; if any new types of files are to be
 # installed, be sure to add an entry to every installation scheme above,
 # and to SCHEME_KEYS here.
@@ -124,7 +119,8 @@ def _get_implementation():
 
 
 def _select_scheme(ob, name):
-    vars(ob).update(_remove_set(ob, _scheme_attrs(_resolve_scheme(name))))
+    scheme = _inject_headers(name, _load_scheme(_resolve_scheme(name)))
+    vars(ob).update(_remove_set(ob, _scheme_attrs(scheme)))
 
 
 def _remove_set(ob, attrs):
@@ -147,9 +143,26 @@ def _resolve_scheme(name):
     return resolved
 
 
-def _scheme_attrs(name):
+def _load_scheme(name):
+    return _load_schemes()[name]
+
+
+def _inject_headers(name, scheme):
+    """
+    Given a scheme name and the resolved scheme,
+    if the scheme does not include headers, resolve
+    the fallback scheme for the name and use headers
+    from it. pypa/distutils#88
+    """
+    # Bypass the preferred scheme, which may not
+    # have defined headers.
+    fallback = _load_scheme(_pypy_hack(name))
+    scheme.setdefault('headers', fallback['headers'])
+    return scheme
+
+
+def _scheme_attrs(scheme):
     """Resolve install directories by applying the install schemes."""
-    scheme = _load_schemes()[name]
     return {
         f'install_{key}': scheme[key]
         for key in SCHEME_KEYS
@@ -395,7 +408,8 @@ def finalize_options(self):
                             'platlibdir': getattr(sys, 'platlibdir', 'lib'),
                             'implementation_lower': _get_implementation().lower(),
                             'implementation': _get_implementation(),
-                            'platsubdir': sysconfig.get_config_var('platsubdir'),
+                            # all values must be str; see #86
+                            'platsubdir': str(sysconfig.get_config_var('platsubdir')),
                            }
 
         if HAS_USER_SITE:


Test patch: