[Python-checkins] CVS: distutils/distutils dist.py,1.41,1.42
Greg Ward
python-dev@python.org
Fri, 10 Nov 2000 18:47:13 -0800
- Previous message: [Python-checkins] CVS: python/dist/src/Modules arraymodule.c,2.58,2.59
- Next message: [Python-checkins] CVS: python/dist/src/Lib/dos-8x3 basehttp.py,1.7,NONE bastion.py,1.7,NONE cgihttps.py,1.9,NONE compilea.py,1.5,NONE configpa.py,1.10,NONE cookie.py,1.1,NONE fileinpu.py,1.4,NONE formatte.py,1.9,NONE gopherli.py,1.3,NONE htmlenti.py,1.2,NONE linecach.py,1.2,NONE macurl2p.py,1.6,NONE mimetool.py,1.8,NONE mimetype.py,1.6,NONE mimewrit.py,1.6,NONE multifil.py,1.6,NONE nturl2pa.py,1.5,NONE posixfil.py,1.10,NONE posixpat.py,1.13,NONE py_compi.py,1.10,NONE queue.py,1.8,NONE reconver.py,1.3,NONE regex_sy.py,1.3,NONE regex_te.py,1.1,NONE rlcomple.py,1.7,NONE robotpar.py,1.1,NONE simpleht.py,1.8,NONE socketse.py,1.11,NONE sre_comp.py,1.7,NONE sre_cons.py,1.5,NONE sre_pars.py,1.8,NONE statcach.py,1.2,NONE string_t.py,1.1,NONE stringio.py,1.7,NONE stringol.py,1.2,NONE telnetli.py,1.4,NONE test_arr.py,1.9,NONE test_ate.py,1.1,NONE test_aud.py,1.4,NONE test_aug.py,1.1,NONE test_bin.py,1.5,NONE test_bsd.py,1.3,NONE test_bui.py,1.1,NONE test_cfg.py,1.1,NONE test_cla.py,1.2,NONE tes!
t_cma.py,1.3,NONE test_com.py,1.1,NONE test_con.py,1.1,NONE test_coo.py,1.1,NONE test_cop.py,1.1,NONE test_cpi.py,1.3,NONE test_cry.py,1.2,NONE test_dos.py,1.1,NONE test_err.py,1.3,NONE test_exc.py,1.6,NONE test_ext.py,1.2,NONE test_fcn.py,1.9,NONE test_fil.py,1.1,NONE test_for.py,1.2,NONE test_gdb.py,1.2,NONE test_get.py,1.1,NONE test_gra.py,1.6,NONE test_gzi.py,1.2,NONE test_has.py,1.1,NONE test_ima.py,1.6,NONE test_img.py,1.4,NONE test_imp.py,1.1,NONE test_lar.py,1.1,NONE test_lin.py,1.3,NONE test_lon.py,1.2,NONE test_mat.py,1.6,NONE test_mim.py,1.1,NONE test_min.py,1.4,NONE test_mma.py,1.4,NONE test_ntp.py,1.3,NONE test_opc.py,1.4,NONE test_ope.py,1.5,NONE test_par.py,1.1,NONE test_pic.py,1.2,NONE test_pol.py,1.1,NONE test_pop.py,1.3,NONE test_pos.py,1.1,NONE test_pye.py,1.3,NONE test_reg.py,1.4,NONE test_rfc.py,1.3,NONE test_rgb.py,1.7,NONE test_rot.py,1.3,NONE test_sel.py,1.7,NONE test_sig.py,1.5,NONE test_soc.py,1.7,NONE test_str.py,1.13,NONE test_sun.py,1.3,NONE tes!
t_sup.py,1.4,NONE test_thr.py,1.4,NONE test_tim.py,1.7,NONE te!
st_tok.p
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/python/distutils/distutils
In directory slayer.i.sourceforge.net:/tmp/cvs-serv6892/distutils
Modified Files:
dist.py
Log Message:
Jack Jansen: added 'get_command_list()' method, and Mac-specific code to
use it to generate a dialog for users to specify the command-line (because
providing a command-line with MacPython is so awkward).
Index: dist.py
===================================================================
RCS file: /cvsroot/python/distutils/distutils/dist.py,v
retrieving revision 1.41
retrieving revision 1.42
diff -C2 -r1.41 -r1.42
*** dist.py 2000/10/14 04:06:40 1.41
--- dist.py 2000/11/11 02:47:11 1.42
***************
*** 173,176 ****
--- 173,182 ----
# It's only safe to query 'have_run' for a command class that has
# been instantiated -- a false value will be inserted when the
+ if sys.platform == 'mac':
+ import EasyDialogs
+ cmdlist = self.get_command_list()
+ self.script_args = EasyDialogs.GetArgv(
+ self.global_options + self.display_options, cmdlist)
+
# command object is created, and replaced with a true value when
# the command is successfully run. Thus it's probably best to use
***************
*** 658,661 ****
--- 664,699 ----
# print_commands ()
+ def get_command_list (self):
+ """Get a list of (command, description) tuples.
+ The list is divided into "standard commands" (listed in
+ distutils.command.__all__) and "extra commands" (mentioned in
+ self.cmdclass, but not a standard command). The descriptions come
+ from the command class attribute 'description'.
+ """
+ # Currently this is only used on Mac OS, for the Mac-only GUI
+ # Distutils interface (by Jack Jansen)
+
+ import distutils.command
+ std_commands = distutils.command.__all__
+ is_std = {}
+ for cmd in std_commands:
+ is_std[cmd] = 1
+
+ extra_commands = []
+ for cmd in self.cmdclass.keys():
+ if not is_std.get(cmd):
+ extra_commands.append(cmd)
+
+ rv = []
+ for cmd in (std_commands + extra_commands):
+ klass = self.cmdclass.get(cmd)
+ if not klass:
+ klass = self.get_command_class(cmd)
+ try:
+ description = klass.description
+ except AttributeError:
+ description = "(no description available)"
+ rv.append((cmd, description))
+ return rv
# -- Command class/object methods ----------------------------------
- Previous message: [Python-checkins] CVS: python/dist/src/Modules arraymodule.c,2.58,2.59
- Next message: [Python-checkins] CVS: python/dist/src/Lib/dos-8x3 basehttp.py,1.7,NONE bastion.py,1.7,NONE cgihttps.py,1.9,NONE compilea.py,1.5,NONE configpa.py,1.10,NONE cookie.py,1.1,NONE fileinpu.py,1.4,NONE formatte.py,1.9,NONE gopherli.py,1.3,NONE htmlenti.py,1.2,NONE linecach.py,1.2,NONE macurl2p.py,1.6,NONE mimetool.py,1.8,NONE mimetype.py,1.6,NONE mimewrit.py,1.6,NONE multifil.py,1.6,NONE nturl2pa.py,1.5,NONE posixfil.py,1.10,NONE posixpat.py,1.13,NONE py_compi.py,1.10,NONE queue.py,1.8,NONE reconver.py,1.3,NONE regex_sy.py,1.3,NONE regex_te.py,1.1,NONE rlcomple.py,1.7,NONE robotpar.py,1.1,NONE simpleht.py,1.8,NONE socketse.py,1.11,NONE sre_comp.py,1.7,NONE sre_cons.py,1.5,NONE sre_pars.py,1.8,NONE statcach.py,1.2,NONE string_t.py,1.1,NONE stringio.py,1.7,NONE stringol.py,1.2,NONE telnetli.py,1.4,NONE test_arr.py,1.9,NONE test_ate.py,1.1,NONE test_aud.py,1.4,NONE test_aug.py,1.1,NONE test_bin.py,1.5,NONE test_bsd.py,1.3,NONE test_bui.py,1.1,NONE test_cfg.py,1.1,NONE test_cla.py,1.2,NONE tes!
t_cma.py,1.3,NONE test_com.py,1.1,NONE test_con.py,1.1,NONE test_coo.py,1.1,NONE test_cop.py,1.1,NONE test_cpi.py,1.3,NONE test_cry.py,1.2,NONE test_dos.py,1.1,NONE test_err.py,1.3,NONE test_exc.py,1.6,NONE test_ext.py,1.2,NONE test_fcn.py,1.9,NONE test_fil.py,1.1,NONE test_for.py,1.2,NONE test_gdb.py,1.2,NONE test_get.py,1.1,NONE test_gra.py,1.6,NONE test_gzi.py,1.2,NONE test_has.py,1.1,NONE test_ima.py,1.6,NONE test_img.py,1.4,NONE test_imp.py,1.1,NONE test_lar.py,1.1,NONE test_lin.py,1.3,NONE test_lon.py,1.2,NONE test_mat.py,1.6,NONE test_mim.py,1.1,NONE test_min.py,1.4,NONE test_mma.py,1.4,NONE test_ntp.py,1.3,NONE test_opc.py,1.4,NONE test_ope.py,1.5,NONE test_par.py,1.1,NONE test_pic.py,1.2,NONE test_pol.py,1.1,NONE test_pop.py,1.3,NONE test_pos.py,1.1,NONE test_pye.py,1.3,NONE test_reg.py,1.4,NONE test_rfc.py,1.3,NONE test_rgb.py,1.7,NONE test_rot.py,1.3,NONE test_sel.py,1.7,NONE test_sig.py,1.5,NONE test_soc.py,1.7,NONE test_str.py,1.13,NONE test_sun.py,1.3,NONE tes!
t_sup.py,1.4,NONE test_thr.py,1.4,NONE test_tim.py,1.7,NONE te!
st_tok.p
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]