From 9b27e3c79b19d32fdb58fb4ec287b5451bbdc659 Mon Sep 17 00:00:00 2001 From: Hsiaoming Yang Date: Tue, 19 Aug 2014 16:50:53 +0800 Subject: [PATCH] Fix bdist_wheel. Add Tag information to WHEEL dist info. Related: http://lepture.com/en/2014/python-on-a-hard-wheel --- setup.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/setup.py b/setup.py index f57349c048a62..a7793f3300dfe 100755 --- a/setup.py +++ b/setup.py @@ -392,6 +392,20 @@ def run(self): 'build': build, 'sdist': CheckSDist} +try: + from wheel.bdist_wheel import bdist_wheel + + class BdistWheel(bdist_wheel): + def get_tag(self): + tag = bdist_wheel.get_tag(self) + repl = 'macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64' + if tag[2] == 'macosx_10_6_intel': + tag = (tag[0], tag[1], repl) + return tag + cmdclass['bdist_wheel'] = BdistWheel +except ImportError: + pass + if cython: suffix = '.pyx' cmdclass['build_ext'] = CheckingBuildExt