From: Andrew M. Kuchling Date: Mon, 4 Nov 2002 13:45:15 +0000 (+0000) Subject: Add get_distutil_options(); future setup.py files can use this to check X-Git-Tag: v2.3c1~3601 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=33a5edf89c566383be3b8825bb68dedbf56380a0;p=python 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.) --- diff --git a/Lib/distutils/core.py b/Lib/distutils/core.py index 9a6bff6b55..d180eb8cb6 100644 --- a/Lib/distutils/core.py +++ b/Lib/distutils/core.py @@ -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 []