diff options
author | Paul Moore <p.f.moore@gmail.com> | 2014-03-17 09:33:53 +0000 |
---|---|---|
committer | Paul Moore <p.f.moore@gmail.com> | 2014-03-17 09:33:53 +0000 |
commit | ceead0fb8b275a830c0f923d0b0f996c3b825d8f (patch) | |
tree | f6bb0a9f0e09f55c0cdd3b755a5c4b03620d8d52 | |
parent | b6d6ea910a1b63d75150a852d92390a697ed6033 (diff) | |
download | wheel-ceead0fb8b275a830c0f923d0b0f996c3b825d8f.tar.gz |
Make --universal a boolean option and move legacy wheel section processing to finalize_options
-rw-r--r-- | wheel/bdist_wheel.py | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/wheel/bdist_wheel.py b/wheel/bdist_wheel.py index e87048d..c63f291 100644 --- a/wheel/bdist_wheel.py +++ b/wheel/bdist_wheel.py @@ -75,11 +75,11 @@ class bdist_wheel(Command): "skip building the setuptools console_scripts", "(default: false)"), ('universal', None, - "make a universal wheel", - "(default: false)"), + "make a universal wheel" + " (default: false)"), ] - boolean_options = ['keep-temp', 'skip-build', 'relative'] + boolean_options = ['keep-temp', 'skip-build', 'relative', 'universal'] def initialize_options(self): self.bdist_dir = None @@ -112,6 +112,14 @@ class bdist_wheel(Command): self.root_is_purelib = self.distribution.is_pure() + # Support legacy [wheel] section for setting universal + wheel = self.distribution.get_option_dict('wheel') + if 'universal' in wheel: + # please don't define this in your global configs + val = wheel['universal'][1].strip() + if val.lower() in ('1', 'true', 'yes'): + self.universal = True + @property def wheel_dist_name(self): """Return distribution full name with - replaced with _""" @@ -127,16 +135,9 @@ class bdist_wheel(Command): plat_name = 'any' impl_name = 'py' if purity: - wheel = self.distribution.get_option_dict('wheel') if self.universal: impl_name = 'py2.py3' impl_ver = '' - elif 'universal' in wheel: - # please don't define this in your global configs - val = wheel['universal'][1].strip() - if val.lower() in ('1', 'true', 'yes'): - impl_name = 'py2.py3' - impl_ver = '' tag = (impl_name + impl_ver, abi_tag, plat_name) else: plat_name = self.plat_name |