[Distutils] Revised design proposal
Fred L. Drake
Fred L. Drake, Jr." <fdrake@acm.org
Mon, 18 Jan 1999 17:55:11 -0500 (EST)
Greg Ward writes:
> (Distinguishing the end of the option list for cmd1 from cmd2 might be a
> bit tricky if command options can take arguments, which they certainly
> should do. If we want getopt-style syntax, it looks like we'll have to
> reinvent the getopt module. :-( And if we opt for a different syntax,
Greg,
I don't see any need to re-implement getopt here; the existing
module should work just fine.
> developer (the person who wrote the setup.py for this module
> distribution) may define a set of distribution-specific command-line
> options, which may be mixed in with the global options (and extracted
The need for this is not clear.
> ------------------------------------------------------------------------
> from distutils.core import setup
> setup (name = "mymod",
> version = "1.2",
> author = "Greg Ward <gward@cnri.reston.va.us>",
> description = "A very simple, one-module distribution")
> ------------------------------------------------------------------------
This is good.
> ...well, that's a start. I still don't know how to make all those
> Unixish C compilation variables more cross-platform.
Meta-comment: I am very concerned that the non-Unix crowd doesn't
seem to be involved with this project. Is there any way to make them
aware of the effort?
> * the command class constructor parses its options to set/override
> some instance attributes
It should get the result of getopt.getopt(...)[0] as a parameter,
pre-parsed, with the class attributes "shortopts" and "longopts" (or
some such) used for the parameters to getopt.getopt().
-Fred
--
Fred L. Drake, Jr. <fdrake@acm.org>
Corporation for National Research Initiatives
1895 Preston White Dr. Reston, VA 20191