summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorAndrew M. Kuchling <amk@amk.ca>2002-11-04 13:45:15 (GMT)
committerAndrew M. Kuchling <amk@amk.ca>2002-11-04 13:45:15 (GMT)
commit33a5edf89c566383be3b8825bb68dedbf56380a0 (patch)
treee4e75494d32c2f04ff98706ae13e1646f78de306 /Lib
parentb6c316f134a3d78fc27e19345ba67608345f0416 (diff)
downloadcpython-33a5edf89c566383be3b8825bb68dedbf56380a0.zip
cpython-33a5edf89c566383be3b8825bb68dedbf56380a0.tar.gz
cpython-33a5edf89c566383be3b8825bb68dedbf56380a0.tar.bz2
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.)
Diffstat (limited to 'Lib')
-rw-r--r--Lib/distutils/core.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/Lib/distutils/core.py b/Lib/distutils/core.py
index 9a6bff6..d180eb8 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 []