mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
Add get_distutil_options(); future setup.py files can use this to check
whether the Distutils being used supports a particularly capability. (This idea was originally suggested by Juergen Hermann as a method on the Distribution class. I think it makes more sense as a function in core.py, and that's what this patch implements.)
This commit is contained in:
parent
b6c316f134
commit
33a5edf89c
1 changed files with 9 additions and 0 deletions
|
@ -227,3 +227,12 @@ def run_setup (script_name, script_args=None, stop_after="run"):
|
|||
return _setup_distribution
|
||||
|
||||
# run_setup ()
|
||||
|
||||
def get_distutil_options ():
|
||||
"""Returns a list of strings recording changes to the Distutils.
|
||||
|
||||
setup.py files can then do:
|
||||
if 'optional-thing' in get_distutil_options():
|
||||
...
|
||||
"""
|
||||
return []
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue