On 30 January 2015 at 04:27, Daniel Holth <[email protected]> wrote: > On Thu, Jan 29, 2015 at 8:37 AM, Nick Coghlan <[email protected]> wrote: >> If we're on CPython 2.x and sysconfig.get_config_var('SOABI') returns >> None, then we can calculate a synthetic SOABI tag as: >> >> * the start of the SOABI tag should be "cpython-" >> * the next two digits will be the major/minor of the release (i.e. 26 or 27) >> * the next character will be 'd' if sys.pydebug is set (I'm fairly >> sure, but double check this) >> * we can assume 'm' (for using pymalloc) safely enough >> * the final character will be 'u' if sys.maxunicode == 0x10ffff >> >> We're not going to add a new kind of ABI variation to Python 2 at this >> stage of its lifecycle, so that calculation should remain valid for as >> long as Python 2 remains in use. > > I would be very happy to receive a patch for: > > https://bitbucket.org/pypa/wheel/src/bdf053a70200c5857c250c2044a2d91da23db4a9/wheel/bdist_wheel.py?at=default#cl-150 > > abi_tag = sysconfig.get_config_vars().get('SOABI', 'none') > if abi_tag.startswith('cpython-'): > abi_tag = 'cp' + abi_tag.rsplit('-', 1)[-1] > > It would have to have a Python 2 implementation as Nick described. > > and this file which controls what can be installed (duplicated in pip) > but also only works on py3: > > https://bitbucket.org/pypa/wheel/src/bdf053a70200c5857c250c2044a2d91da23db4a9/wheel/pep425tags.py?at=default#cl-65 > > abi3s = set() > import imp > for suffix in imp.get_suffixes(): > if suffix[0].startswith('.abi'): > abi3s.add(suffix[0].split('.', 2)[1])
Thanks, I've transferred the relevant details from this thread to https://bitbucket.org/pypa/wheel/issue/63/backport-soabi-to-python-2 Any takers with the roundtuits to put together a patch? (Ideally with tests, but given the nature of the code being added, I'm not sure how feasible that will be) Regards, Nick. -- Nick Coghlan | [email protected] | Brisbane, Australia _______________________________________________ Distutils-SIG maillist - [email protected] https://mail.python.org/mailman/listinfo/distutils-sig
