[Python-checkins] python/dist/src/Lib/distutils core.py,1.51,1.52

akuchling@users.sourceforge.net akuchling@users.sourceforge.net
Mon, 04 Nov 2002 05:45:18 -0800


Update of /cvsroot/python/python/dist/src/Lib/distutils
In directory usw-pr-cvs1:/tmp/cvs-serv20944

Modified Files:
	core.py 
Log Message:
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.)


Index: core.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/distutils/core.py,v
retrieving revision 1.51
retrieving revision 1.52
diff -C2 -d -r1.51 -r1.52
*** core.py	11 Sep 2002 16:31:52 -0000	1.51
--- core.py	4 Nov 2002 13:45:15 -0000	1.52
***************
*** 228,229 ****
--- 228,238 ----
  
  # 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 []