Mercurial > hg
comparison setup.py @ 44630:4c6189d45d67
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.
author | Augie Fackler <augie@google.com> |
---|---|
date | Tue, 31 Mar 2020 16:14:10 -0400 |
parents | 960770add699 |
children | e147748f750b |
comparison
equal
deleted
inserted
replaced
44629:d37975386798 | 44630:4c6189d45d67 |
---|---|
487 negative_opt = Distribution.negative_opt.copy() | 487 negative_opt = Distribution.negative_opt.copy() |
488 boolean_options = ['pure', 'rust', 'no-rust'] | 488 boolean_options = ['pure', 'rust', 'no-rust'] |
489 negative_opt['no-rust'] = 'rust' | 489 negative_opt['no-rust'] = 'rust' |
490 | 490 |
491 def _set_command_options(self, command_obj, option_dict=None): | 491 def _set_command_options(self, command_obj, option_dict=None): |
492 command_obj.boolean_options += self.boolean_options | 492 # Not all distutils versions in the wild have boolean_options. |
493 # This should be cleaned up when we're Python 3 only. | |
494 command_obj.boolean_options = ( | |
495 getattr(command_obj, 'boolean_options', []) + self.boolean_options | |
496 ) | |
493 return Distribution._set_command_options( | 497 return Distribution._set_command_options( |
494 self, command_obj, option_dict=option_dict | 498 self, command_obj, option_dict=option_dict |
495 ) | 499 ) |
496 | 500 |
497 def parse_command_line(self): | 501 def parse_command_line(self): |