# HG changeset patch # User Augie Fackler # Date 2020-03-31 20:14:10 # Node ID 4c6189d45d672cc427c63ed907319ab29831883b # Parent d37975386798a69e3f0e0b14d32bc52aba805bdb setup: work around old versions of distutils breaking setup.py I'm not really sure how to trigger this, but we saw it in our build environment for Windows at Google. This fixed it. Sigh. diff --git a/setup.py b/setup.py --- a/setup.py +++ b/setup.py @@ -489,7 +489,11 @@ class hgdist(Distribution): negative_opt['no-rust'] = 'rust' def _set_command_options(self, command_obj, option_dict=None): - command_obj.boolean_options += self.boolean_options + # Not all distutils versions in the wild have boolean_options. + # This should be cleaned up when we're Python 3 only. + command_obj.boolean_options = ( + getattr(command_obj, 'boolean_options', []) + self.boolean_options + ) return Distribution._set_command_options( self, command_obj, option_dict=option_dict )