]> granicus.if.org Git - python/commitdiff
Add get_distutil_options(); future setup.py files can use this to check
authorAndrew M. Kuchling <amk@amk.ca>
Mon, 4 Nov 2002 13:45:15 +0000 (13:45 +0000)
committerAndrew M. Kuchling <amk@amk.ca>
Mon, 4 Nov 2002 13:45:15 +0000 (13:45 +0000)
   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.)

Lib/distutils/core.py

index 9a6bff6b55af514ce8873fd5fd537a7e34bd3969..d180eb8cb6639b606e6df2b647a80828c105d505 100644 (file)
@@ -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 []