summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/dist.py
Commit message (Collapse)AuthorAgeFilesLines
* Back out the requirement to supply a version numberAndrew M. Kuchling2001-03-311-4/+0
|
* Use the get_contact*() accessors instead of get_maintainer*()Andrew M. Kuchling2001-03-221-2/+2
|
* Add 'platforms' and 'keywords' attributes to the DistributionMetadata class,Andrew M. Kuchling2001-03-221-5/+70
| | | | | | | | along with options to print them. Add a finalize_options() method to Distribution to do final processing on the platform and keyword attributes Add DistributionMetadata.write_pkg_info() method to write a PKG-INFO file into the release tree.
* Bug #409403: Signal an error if the distribution's metadata has no versionAndrew M. Kuchling2001-03-171-0/+4
|
* Fix from Jack Jansen for the Mac and the Metrowerks compiler, postedAndrew M. Kuchling2001-01-151-6/+10
| | | | | to the Distutils-SIG and archived at http://mail.python.org/pipermail/distutils-sig/2000-November/001755.html
* Jack Jansen: added 'get_command_list()' method, and Mac-specific code toGreg Ward2000-11-111-0/+38
| | | | | use it to generate a dialog for users to specify the command-line (because providing a command-line with MacPython is so awkward).
* Untabified.Greg Ward2000-10-141-5/+5
|
* Fix '_set_command_options()' so it only calls 'strtobool()' on stringsGreg Ward2000-09-271-2/+3
| | | | (was crashing on any boolean command-line option!).
* Standardize whitespace in function calls and docstrings.Greg Ward2000-09-261-62/+62
|
* Change to use the new 'translate_longopt()' function from fancy_getopt, ratherGreg Ward2000-09-251-5/+5
| | | | than rolling our own with fancy_getopt's 'longopt_xlate' global.
* Fixed some bugs and mis-features in handling config files:Greg Ward2000-09-251-9/+44
| | | | | | | | | | | | | | | * options can now be spelled "foo-bar" or "foo_bar" (handled in 'parse_config_files()', just after we parse a file) * added a "[global]" section so there's a place to set global options like verbose/quiet and dry-run * respect the "negative alias" dictionary so (eg.) "quiet=1" is the same as "verbose=0" (this had to be done twice: once in 'parse_config_file()' for global options, and once in '_set_command_options()' for per-command options) * the other half of handling boolean options correctly: allow commands to list their boolean options in a 'boolean_options' class attribute, and use it to translate strings (like "yes", "1", "no", "0", etc) to true or false
* Remove some debugging output from the last change.Greg Ward2000-09-161-7/+0
|
* Generalized 'reinitialize_command()' so it can optionally reinitializeGreg Ward2000-09-161-2/+20
| | | | | | the command's sub-commands as well (off by default). This is essential if we want to be be able to run (eg.) "install" twice in one run, as happens when generating multiple built distributions in one run.
* Added 'script_name' and 'script_args' instance attributes to Distribution.Greg Ward2000-08-291-23/+29
| | | | | | | | Changed 'core.setup()' so it sets them to reasonable defaults. Tweaked how the "usage" string is generated: 'core' now provides 'gen_usage()', which is used instead of 'USAGE'. Modified "build_py" and "sdist" commands to refer to 'self.distribution.script_name' rather than 'sys.argv[0]'.
* Fixed a grab-bag of typos spotted by Rob Hooft.Greg Ward2000-07-271-2/+2
|
* fix inconsistent use of tabs and spacesJeremy Hylton2000-07-071-17/+17
|
* Typo fix.Greg Ward2000-06-281-1/+1
|
* More stylistic tweaks to the generic '--help-xxx' code.Greg Ward2000-06-241-12/+15
|
* Stylistic/formatting changes to Rene Liebscher's '--help-xxx' patch.Greg Ward2000-06-241-10/+27
|
* Patch from Rene Liebscher: this adds "--help-foo" options to list theGreg Ward2000-06-071-3/+29
| | | | | | | | | | values that "--foo" can take for various commands: eg. what formats for "sdist" and "bdist", what compilers for "build_ext" and "build_clib". I have *not* reviewed this patch; I'm checking it in as-is because it also fixes a paper-bag-over-head bug in bdist.py, and because I won't have time to review it properly for several days: so someone else can test it for me, instead!
* Always look for the system config file in the Distutils module directory,Greg Ward2000-06-071-9/+12
| | | | | and call it "distutils.cfg" instead of "pydistutils.cfg" (personal config files are still ".pydistutils.cfg" or "pydistutils.cfg", though).
* Patch from Rene Liebscher:Greg Ward2000-06-071-15/+16
| | | | | | | | Look for personal config file in /home/greg on Windows, too: users will have to set /home/greg to use this, so it's not something that many people will use. But if python-dev comes up with the "right way" to divine a home directory on Windows, we can use that to set /home/greg and poof! -- personal Distutils config files on Windows.
* Fix 'reinitialize_command()' so it resets the 'have_run' flag for theGreg Ward2000-06-061-0/+1
| | | | command being reinitialized to false.
* Only print debugging output if DEBUG true (and deleted some of the moreGreg Ward2000-06-021-6/+7
| | | | extraneous debug prints).
* Reformatted and updated many docstrings.Greg Ward2000-06-021-25/+22
|
* Oops, 'reinitialize_command()' forgot to return the command object if didn'tGreg Ward2000-06-011-1/+1
| | | | need to be reinitialized -- fixed.
* Factored '_set_command_options()' out of 'get_command_obj()'.Greg Ward2000-05-281-8/+82
| | | | | | | | | | | | | Added 'reinitialize_command()' -- lets us "push" option values in a controlled, safe way; this is a small change to the code, but a big change to the Distutils philosophy of passing option values around. The preferred mode is still definitely to "pull" options from another command (eg. "install" fetches the base build directory from "build"), but it is now feasible to "push" options onto another command, when you know what's best for it. One possible application will be a "config" command, which pokes around the system and pushes values (eg. include and library directories) onto the "build" command. Added 'dump_option_dicts()' method (for debugging output).
* Some far-reaching naming changes:Greg Ward2000-05-271-1/+1
| | | | | | | * Command method 'find_peer()' -> 'get_finalized_command()' * Command method 'run_peer()' -> 'run_command()' Also deleted the 'get_command_option()' method from Command, and fixed the one place where it was used (in "bdist_dumb").
* Support for the "install_headers" command: distribution option 'headers'Greg Ward2000-05-271-0/+4
| | | | and method 'has_headers()'.
* Factored out code for extracting-or-creating one of the optionGreg Ward2000-05-261-13/+20
| | | | | | | | | | dictionaries in 'self.command_options' to 'get_option_dict()'. Simplified code in 'parse_config_files()' and 'parse_command_line()' accordingly. Fixed code in constructor that processes the 'options' dictionary from the setup script so it actually works: uses the new 'self.command_options' dictionary rather than creating command objects and calling 'set_option()' on them.
* Fix 'get_command_obj()' so it checks if a command object has an attributeGreg Ward2000-05-231-0/+4
| | | | before setting it -- this will catch bad options (eg. typos) in config files.
* Fixed so options from config files and command lines actually work:Greg Ward2000-05-231-7/+27
| | | | | | | | | | * 'get_command_obj()' now sets command attributes based on the 'command_options' dictionary * some typos fixed * kludged 'parse_config_files()' to re-initialize the ConfigParser instance after each file, so we know for sure which config file each option comes form * added lots of handy debugging output
* Marching towards full support of config files: thoroughly overhauled theGreg Ward2000-05-231-209/+238
| | | | | | | | | | | | | | | | | | command-line parsing code, splitting it up into several methods (new methods: '_parse_command_opts()', '_show_help()') and making it put options into the 'command_options' dictionary rather than instantiating command objects and putting them there. Lots of other little changes: * merged 'find_command_class()' and 'create_command_obj()' and called the result 'get_command_class()' * renamed 'find_command_obj()' to 'get_command_obj()', and added command object creation and maintenance of the command object cache to its responsibilities (taken over from 'create_command_obj()') * parse config files one-at-a-time, so we can keep track of the filename for later error reporting * tweaked some help messages * fixed up many obsolete comments and docstrings
* Added 'has_scripts()', 'has_data_files()' methods.Greg Ward2000-05-201-0/+6
|
* Added missing import.Greg Ward2000-05-201-0/+1
|
* List data files are listed in the Distribution attribute 'data_files',Gregory P. Smith2000-05-131-1/+1
| | | | rather than 'data'.
* Patch from Bastien Kleineidam:Gregory P. Smith2000-05-121-0/+2
| | | | | | adds the 'install_data' and 'install_scripts' commands; these two are trivial thanks to the 'install_misc' base class in cmd.py. (Minor tweaks and commentary by me; the code is untested so far.)
* Preliminary support for config files:Gregory P. Smith2000-05-121-12/+82
| | | | | | - added 'find_config_files()' and 'parse_config_files()' methods - added 'command_options' attribute Comment/docstring updates.
* Got rid of several little-used and not-very-useful methods: 'get_option()',Greg Ward2000-05-071-47/+2
| | | | 'get_options()', 'get_command_option()', 'get_command_options()'.
* Harry Henry Gebel: add 'long_description' to DistributionMetadata.Greg Ward2000-04-261-1/+7
|
* Fix how we generate the meta-data query methods to include 'get_fullname()'Greg Ward2000-04-221-3/+5
| | | | and the other "composite meta-data" methods.
* Fixed the '--license' option so it's officially an alias for '--licence',Greg Ward2000-04-211-4/+1
| | | | and now actually works.
* Patch, originally from Bastian Kleineidam and savagely mutilated by me,Greg Ward2000-04-211-50/+193
| | | | | | | | | | | | | | | | | to add the "display metadata" options: --name, --version, --author, and so forth. Main changes: * added 'display_options' class attribute to list all the "display only" options (--help-commands plus the metadata options) * added DistributionMetadata class as a place to put the actual metadata information from the setup script (not to be confused with the metadata display options); the logic dealing with metadata (eg. return self.name or "UNKNOWN") is now in this class * changed 'parse_command_line()' to use the new OO interface provided by fancy_getopt, mainly so we can get at the original order of options on the command line, so we can print multiple lines of distribution meta-data in the order specified by the user * added 'handle_display_options()' to handle display-only options Also fixed some crufty old comments/docstrings.
* Cleaned up/simplified error-handling:Greg Ward2000-04-151-27/+9
| | | | | | | | | | | | | - DistutilsOptionError is now documented as it's actually used, ie. to indicate bogus option values (usually user options, eg. from the command-line) - added DistutilsSetupError to indicate errors that definitely arise in the setup script - got rid of DistutilsValueError, and changed all usage of it to either DistutilsSetupError or ValueError as appropriate - simplified a bunch of option get/set methods in Command and Distribution classes -- just pass on AttributeError most of the time, rather than turning it into something else
* Removed global '--force' option -- just too vague a concept to be applicableGreg Ward2000-04-101-3/+0
| | | | | | to all commands in the same way. Several Command methods now either expect 'self.force' to be defined, or check if it is defined and assume it's false if not.
* Add missing import of 'usage' string.Greg Ward2000-04-061-2/+2
|
* Reorganization: moved the Distribution class from core.py to dist.py, andGreg Ward2000-04-041-0/+567
the Command class from core.py to cmd.py. No other code needs changing though; distutils.core still provides the Command and Distribution classes, although indirectly now.