summaryrefslogtreecommitdiffstats
path: root/Lib
Commit message (Collapse)AuthorAgeFilesLines
* Fix for PR#111: when using the inplace option, give the new file theGuido van Rossum1999-10-181-3/+15
| | | | | same permissions as the old file, plugging a security hole. (Not using exactly the suggested bugfix.)
* os.fork raises AttributeError, not NameError, if fork() isn'tFred Drake1999-10-181-1/+1
| | | | supported. Pointed out by Moshe Zadka <moshez@math.huji.ac.il>.
* Based on comments from Paul Prescod:Fred Drake1999-10-161-2/+11
| | | | | If os.fork() doesn't exist, raise SystemError with an explanation at the top of the module. Added a note to the module docstring.
* Mainlining the string_methods branch. See branch revision logBarry Warsaw1999-10-122-860/+550
| | | | messages for specific changes.
* update to use threading module instead of thread.Jeremy Hylton1999-10-121-4/+4
|
* fixed a typo in a docstring, and slightly expanded the moduleBarry Warsaw1999-10-121-3/+2
| | | | docstring info for readfp().
* Fix PR#31 -- zfill() mishandles empty string.Guido van Rossum1999-10-111-1/+1
|
* Jeremy writes:Guido van Rossum1999-10-101-1/+2
| | | | | | | | I found the following patch helpful in tracking down a bug in some code. I had appended time, the module, instead of time.time(). Not sure if it is generally true that printing the repr of the object is good, but I expect that most unpicklable things will have fairly information and concise reprs (like files or sockets or modules).
* Fix PR#3, submitted by Skip Montanaro: if no space appears after theGuido van Rossum1999-10-061-1/+1
| | | | colon, the first character of the value is lost.
* Added has_option(); fix bug in get() which botched interpolation ifGuido van Rossum1999-10-041-1/+16
| | | | '%(' was found in first position (found by Fred Drake).
* Urmpfh!Guido van Rossum1999-10-041-8/+43
| | | | | | | | | | | | | | | | | | | | | Withdraw the change that Fred just checked in -- it was a poorly documented feature, not a bug, to ignore I/O errors in read(). The new docstring explains the reason for the feature: """ this is designed so that you can specifiy a list of potential configuration file locations (e.g. current directory, user's home directory, systemwide directory), and all existing configuration files in the list will be read. """ Also add a lower-level function, readfp(), which takes an open file object (and optionally a filename). XXX There are some other problems with this module, but I don't have time to dig into these; in particular, there are complaints that the %(name)s substitution from the [DEFAULTS] section doesn't work correctly.
* ConfigParser.read(): Don't mask IOError exceptions.Fred Drake1999-10-041-5/+3
|
* Filter 'glob()' results so we only look at regular files.Greg Ward1999-10-031-2/+2
|
* Pass 'force' flag to 'new_compiler()'.Greg Ward1999-10-031-2/+3
|
* Don't import what we don't use.Greg Ward1999-10-031-1/+1
|
* Tweaked verbosity messages for byte-compilation.Greg Ward1999-10-032-4/+4
|
* Added 'force' and 'quiet' (negative alias for 'verbose') to theGreg Ward1999-10-031-83/+84
| | | | | | | | | | | | | | | | | | global options table. Every Command instance now has its own copies of the global options, which automatically fallback to the Distribution instance. Changes: - initialize them in constructor - added '__getattr__()' to handle the fallback logic - changed every 'self.distribution.{verbose,dry_run}' in Command to 'self.{verbose,dry_run}'. - filesystem utility methods ('copy_file()' et al) don't take 'update' parameter anymore -- instead we pass 'not force' to the underlying function as 'update' Changed parsing of command line so that global options apply to all commands as well -- that's how (eg.) Command.verbose will be initialized. Simplified 'make_file()' to use 'newer_group()' (from util module). Deleted some cruft. Some docstring tweaks.
* Fixed 'mkpath()' to normalize the path right off the bat -- cleans upGreg Ward1999-10-031-5/+7
| | | | | | | the code a bit and should make it work under Windows even with trailing backslash. Fixed a couple of docstrings. Added comment about 'make_file()' possibly being redundant and unnecessary.
* Hacked to support the notion of "negative alias" options, to handleGreg Ward1999-10-031-3/+32
| | | | -q/--quiet reasonably elegantly.
* Catch up with changes in 'gen_lib_options()':Greg Ward1999-10-031-5/+30
| | | | | | | | - change how we call it - added methods 'library_dir_option()', 'library_option()', and 'find_library_file()' that it calls Added 'force' flag; it's automatically "respected", because this class always rebuilds everything! (Which it to say, "force=0" is not respected.)
* Fixed order of link options: object files now precede library stuff.Greg Ward1999-10-031-21/+58
| | | | | | | | Catch up with changes in 'gen_lib_options()': - change how we call it - added methods 'library_dir_option()', 'library_option()', and 'find_library_file()' that it calls Added 'force' flag and changed compile/link methods to respect it.
* Slight change to the meaning of the 'libraries' list: if a library nameGreg Ward1999-10-031-14/+37
| | | | | | | | | | | | has a directory component, then we only search for the library in that one directory, ie. ignore the 'library_dirs' lists for that one library. Changed calling convention to 'gen_lib_options()' again: now, it takes a CCompiler instance and calls methods on it instead of taking format strings. Also implemented the new "library name" semantics using the 'find_library_file()' method in the CCompiler instance. Added 'force' flag to CCompiler; added to constructor and 'new_compiler()'. Added 'warn()' method.
* Duncan Grisby noted a typo in _DummyThread.Guido van Rossum1999-09-291-1/+1
|
* Added 'list_only' option (and modified 'run()' to respect it).Greg Ward1999-09-291-1/+9
|
* Added all documentation.Greg Ward1999-09-291-13/+106
| | | | | Slightly improved the code for dealing with newline on a comment line, and for stripping whitespace.
* New command to generate source distribution based on a manifest file.Greg Ward1999-09-291-0/+590
|
* Added 'package' option.Greg Ward1999-09-291-7/+44
| | | | | | | | | | | | Catch up with renamed 'platdir' -> 'build_platlib' option in 'build'. Don't call 'set_final_options()' in 'run()' anymore -- that's now guaranteed to be taken care of for us by the Distribution instance. If 'include_dirs' is a string, split it on os.pathsep (this is half- hearted -- support for setting compile/link options on the command line is totally lame and probably won't work at all). Added 'get_source_files()' for use by 'dist' command. Added code to 'build_extensions()' to figure out the "def file" to use with MSVC++ and add it to the linker command line as an "extra_postarg".
* Renamed 'dir' option to be consistent with other commands.Greg Ward1999-09-291-35/+66
| | | | | | | | | | | | Don't call 'set_final_options()' in 'run()' anymore -- that's now guaranteed to be taken care of for us by the Distribution instance. Rearranged to bit to allow outsiders (specifically, the 'dist' command) to find out what modules we would build: - 'find_modules()' renamed to 'find_package_modules()' - most of 'build_modules()' abstracted out to 'find_modules()' - added 'get_source_files()' (for the 'dist' command to use) - drastically simplified 'build_modules()' -- now just a wrapper around 'find_modules()' and 'build_module()'
* Renamed many options to be consistent across commands.Greg Ward1999-09-295-41/+35
| | | | | | Tweaked some help strings to be consistent with documentation. Don't call 'set_final_options()' in 'run()' anymore -- that's now guaranteed to be taken care of for us by the Distribution instance.
* Catch up with latest changes in CCompiler:Greg Ward1999-09-291-58/+45
| | | | | | | | | | | | - add 'extra_preargs' and 'extra_postargs' parameters (and use them!) - got rid of 'build_info' kludge parameter - added 'compiler_type' class attribute - respect reordered arguments to 'gen_lib_options()' Also added 'output_dir' parameter (catching up with older change in CCompiler) -- BUT this is presently ignored by all methods! Deleted some more docstrings redundant with CCompiler. Dropped generated of "/DEF:" argument --- that's now done by the 'build_ext' command.
* Catch up with latest changes in CCompiler:Greg Ward1999-09-291-10/+22
| | | | | | - add 'extra_preargs' and 'extra_postargs' parameters (and use them!) - added 'compiler_type' class attribute - respect reordered arguments to 'gen_lib_options()'
* Added 'extra_preargs' and 'extra_postargs' parameters to most methods,Greg Ward1999-09-291-47/+94
| | | | | | | | | | | | | which allowed us to get rid of the 'build_info' used in some places (a temporary kludge to support MSVC++ "def" files). Deleted big comment whining about that kludge. Added 'compiler_type' class attribute. Overhauled 'new_compiler()': now takes 'compiler' argument along with 'plat' (both optional with sensible defaults), and looks them both up in the new 'default_compiler' and 'compiler_class' dictionaries to figure out where to get the concrete compiler class from. Reordered arguments to 'gen_lib_options()' to match the order in which the arguments are generated (ie. -L before -l).
* More tweaks to 'mkpath()':Greg Ward1999-09-291-0/+5
| | | | | | - deal with empty tail from os.path.split() (eg. from trailing slash, or backslash, or whatever) - check PATH_CREATED hash inside loop as well
* Added 'ready' flag and 'ensure_ready()' method to Command: togetherGreg Ward1999-09-291-28/+53
| | | | | | | | | they make sure that 'set_final_options()' has been called, but isn't called redundantly. Changed Distribution to call 'ensure_ready()' where it used to call 'set_final_options()', and in a few extra places as well. Lots of comment/docstring revisions and additions in both classes. New one-liner utility methods in Command: 'find_peer()', 'spawn()'.
* Added docstring and RCS id (apparently some Windows tar extractorsGreg Ward1999-09-221-0/+11
| | | | ignore zero-byte files: grr...).
* Ditched the whole notion of "alias options": this meant dropping theGreg Ward1999-09-211-39/+21
| | | | | | | | | | | | | 'alias_options' table and getting rid of some hairy code in the Distribution constructor. Resurrected the distribution options that describe the modules present in the module distribution ('py_modules', 'ext_modules'), and added a bunch more: 'packages', 'package_dir', 'ext_package', 'include_dirs', 'install_path'. Updated some comments. Added 'warn()' method to Command. 'Command.get_command_name()' now stores generated command name in self.command_name.
* Added 'write_file()' function.Greg Ward1999-09-211-1/+22
| | | | | | | Added global cache PATH_CREATED used by 'mkpath()' to ensure it doesn't try to create the same path more than once in a session (and, more importantly, to ensure that it doesn't print "creating X" more than once for each X per session!).
* In 'link_shared_object()', try to be less sensitive to missing input filesGreg Ward1999-09-211-1/+11
| | | | in dry-run mode.
* Typecheck elements of 'macros' parameter in 'gen_preprocess_options().Greg Ward1999-09-211-0/+8
|
* Added docstring, brought __all__ up-to-date.Greg Ward1999-09-211-2/+19
|
* Added 'install_path' option for giving non-packagized moduleGreg Ward1999-09-211-12/+82
| | | | | | | | | | | distributions their own directory (and .pth file). Overhauled how we determine installation directories in 'set_final_options()' to separate platform-dependence and take 'install_path' option into account. Added 'create_path_file()' to create path config file when 'install_path' given. Only run 'install_py' and 'install_ext' when, respectively, there are some pure Python modules and some extension modules in the distribution.
* Only run build_py if we have pure Python modules, and build_ext if weGreg Ward1999-09-211-5/+9
| | | | have extension modules.
* Some option changes:Greg Ward1999-09-211-17/+30
| | | | | | | | | | - rename 'dir' to 'build_dir' - take 'package' from distribution option 'ext_package' - take 'extensions' from distribution option 'ext_modules' - take 'include_dirs' from distribution Name keyword args explictly when calling CCompiler methods. Overhauled how we generate extension filenames (in 'extension_filename() and 'build_extension()') to take 'package' option into account.
* Basically a complete rewrite to support dealing with modules in wholeGreg Ward1999-09-211-36/+197
| | | | packages and searching for source files by 'package_dir'.
* Peter Haight discovered that this code uses a mutable default for cnfGuido van Rossum1999-09-201-1/+3
| | | | | and then (under certain circumstances) can clobber the default! He also submitted this patch as PR#82.
* After much hemming and hawing, we decided to roll back Fred's change.Guido van Rossum1999-09-151-5/+5
| | | | | | It breaks Mailman, it was actually documented in the docstring, so it was an intentional deviation from the usual del semantics. Let's document the original behavior in Doc/lib/librfc822.tex.
* Typo: the method called is do_SPAM, not handle_SPAM.Guido van Rossum1999-09-151-1/+1
|
* Put Sam Rushing's original RCS ID string back, without dollars around it.Guido van Rossum1999-09-141-1/+1
|
* Put Sam Rushing's original RCS ID string back, without dollars around it.Guido van Rossum1999-09-141-1/+1
|
* Changed selection of installation directories (in 'set_final_options()')Greg Ward1999-09-132-12/+28
| | | | | so that pure Python modules are installed to the platform-specific directory if there are any extension modules in this distribution.