From ebd83eadad6780ac0d30d90a67cc3c7d89465bd7 Mon Sep 17 00:00:00 2001 From: Thomas VINCENT Date: Tue, 5 Nov 2019 22:22:56 +0100 Subject: [PATCH] Improve bdist_wheel override by not setting root_is_pure = True --- setup.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/setup.py b/setup.py index ac479561..6a2507ad 100644 --- a/setup.py +++ b/setup.py @@ -48,13 +48,14 @@ class BDistWheel(bdist_wheel): """Override bdist_wheel to handle as pure python package""" def finalize_options(self): - bdist_wheel.finalize_options(self) - self.root_is_pure = True - self.plat_name_supplied = True self.plat_name = get_platform() - self.universal = not sys.platform.startswith('win') - if not self.universal: - self.python_tag = 'py' + str(sys.version_info[0]) + if not sys.platform.startswith('win'): + self.python_tag = "py2.py3" + bdist_wheel.finalize_options(self) + + def get_tag(self): + """Override the python and abi tag generation""" + return self.python_tag, "none", bdist_wheel.get_tag(self)[-1] # Plugins