these must come from the 'build' command. This means we no longer need
the misconceived 'set_peer_option()' method in Command and, more importantly,
sweeps away a bunch of potential future complexity to handle this tricky
case.
Fix 'Command.set_undefined_option()' to call 'ensure_ready()' rather
than 'finalize_options()' (which is only supposed to be called once,
which is the whole point of 'ensure_ready()').
Added comment to 'set_peer_option()' to remind myself that this method
cannot work and is fundamentally wrong-headed.
this command for a while; this implements roughly the plan cooked up by
Guido, Fred, and me. Seems to strike a nice balance between usability in
the common cases (just set one option), expandability for more types of
files to install in future, and customizability of installation
directories.
This revision isn't completely working: standard and alternate
installations work fine, but there are still some kinks to work out of
customized installations.
Attached you find an update of the Unicode implementation.
The patch is against the current CVS version. I would appreciate
if someone with CVS checkin permissions could check the changes
in.
The patch contains all bugs and patches sent this week and also
fixes a leak in the codecs code and a bug in the free list code
for Unicode objects (which only shows up when compiling Python
with Py_DEBUG; thanks to MarkH for spotting this one).
* improve help strings
* warn if user supplies non-existing directories
* don't try to 'remove_tree()' non-existing directories
* try to remove the build_base after cleanup (but don't do or say
anything if it fails -- this is just in case we made it empty)
option in the 'build_ext' command):
* in ccompiler.py: 'gen_lib_options()' now takes 'runtime_library_dirs'
parameter
* in unixccompiler.py and msvccompiler.py: now pass
'self.runtime_library_dirs' to 'gen_lib_options()', and define
'runtime_library_dir_option()' (although in msvccompiler.py it
blows up with a DistutilsPlatformError right now!)
code generator uses flowgraph as intermediate representation. the old
rep uses a list with explicit "StackRefs" to indicate the target
of jumps.
pyassem converts flowgraph to bytecode, breaks up individual steps of
generating bytecode
sure it's imported! ;)
Re-wrap the docstrings on get_python_inc() and get_python_lib() to be
closer to the "normal" Python style. See GvR's "style guide" on the
essays page (http://www.python.org/doc/essays/).
There should never be a space between a function name and the '(' that
opens the argument list (see the style guide again).
the platform-neutral include dir by default and with Mac support.
Added 'get_python_lib()', inspired by 'get_python_inc()'.
Rewrote 'get_config_h_filename()' and 'get_makefile_filename()'
in terms of 'get_python_inc()' and 'get_python_lib()'.
Changed '_init_nt()' and '_init_mac()' to use 'get_python_inc()' and
'get_python_lib()' for directory names.
When you set a breakpoint on a function with a multi-line argument
list, the breakpoint is actually set on the second line of the
arguments instead of the first line of the body. This patch fixes
that.
fix imports
remove parse functions and visitor code
track name change: Classdef to Class
add some comments and tweak order of visitXXX methods
get rid of if __name__ == "__main__ section
implement it (so far):
* moved filename generation methods into CCompiler base class,
driven by data supplied by implementation classes
* moved a bunch of common code from UnixCCompiler to convenience
methods in CCompiler
* overhauled MSVCCompiler's compile/link methods to look and act
as much as possible like UnixCCompiler's, in order to regularize
both interface and behaviour (especially by using those new
convenience methods)
* replaced build_lib.py with build_clib.py
* renamed the class in build_clib.py
* changed all references to 'build_lib' command in other command classes
when building extensions (uses build_lib's 'get_library_names()' method).
Ensure that the relative structure of source filenames is preserved in
the temporary build tree, eg. foo/bar.c compiles to
build/temp.<plat>/foo/bar.o.
Added 'build_clib' and 'build_temp' options (where to put C libraries
and where to put temporary compiler by-products, ie. object files).
Moved the call to 'check_library_list()' from 'run()' to 'finalize_options()'
-- that way, if we're going to crash we do so earlier, and we guarantee
that the library list is valid before we do anything (not just run).
Disallow directory separators in library names -- the compiled library
always goes right in 'build_clib'.
Added 'get_library_names()', so the "build_ext" command knows what
libraries to link every extension with.
filenames when constructing object filenames, even if output_dir given --
eg. "foo/bar.c" will compile to "foo/bar.o" without an output_dir, and to
"temp/foo/bar.o" if output_dir is "temp".
* 'build_dir' -> 'build_lib', which by default takes its value
straight from 'build_lib' in the 'build' command
* added 'build_temp' and 'inplace' options
* change 'build_extensions()' to put object files (compiler turds) in
'build_temp' dir
* complicated the name-of-extension-file shenanigans in
'build_extensions()' to support "in-place" extension building, i.e.
put the extension right into the source tree (handy for developers)
* added 'get_ext_fullname()', renamed 'extension_filename()' to
'get_ext_filename()', and tweaked the latter a bit -- all to support
the new filename shenanigans
This patch is re: Lucas.Dejonge@awtpl.com.au: [Python-bugs-list] imaplib -
not complying with RFC (PR#218)
Lucas de Jonge reported that the code in imaplib that detects a read-write
to read-only change doesn't comply with RFC 2060.
discussed on c.l.py last January. Specifically:
- more characters allowed in section & option names
- if '=' is used to separate the option & value, the value can be
followed by a comment of the form '\s;'
OptionMenu is modified. Somewhat rewritten and elaborated by myself.
class _setit: The constructor now takes an optional argument
`callback' and stashes this in a private variable. If set, the
__call__() method will invoke this callback after the variable's value
has changed. It will pass the callback the value, followed by any
args passed to __call__().
class OptionMenu: The constructor now takes keyword arguments, the
only one that's legally recognized is `command', which can be set to a
callback. This callback is invoked when the OptionMenu value is set.
Any other keyword argument throws a TclError.
A change in my last patch could, under certain circumstances,
cause a loop if the connection to the server dropped while
waiting for a command completion. I've changed the code to
re-raise the error after possible debugging output.
standard library. Added some comments:
# XXX Note: this is now a standard library module.
# XXX The API needs to undergo changes however; the current code is too
# XXX script-like. This will be addressed later.
add clsFilesystemImporter class attribute, alter handling of suffix list
convert suffix importers to funcs rather than instances
remove backwards compat code: Importer.install and 2-tuple get_code()
result values
switch to isinstance() rather than direct type comparisons
removing chaining concept
update ImportManager.install() to take an optional namespace to install
itself in. this will be useful for setting up rexec environments.
minor comment nits