Greg Ward [Sun, 25 Jun 2000 03:14:13 +0000 (03:14 +0000)]
Minor wording tweaks.
Kludged the extra-wide table that summarizes the manifest template language
(works with LaTeX, but is an *evil* kludge and could well break LaTeX2HTML
or similar...).
Greg Ward [Sun, 25 Jun 2000 02:31:16 +0000 (02:31 +0000)]
Define the 'executables' class attribute so the CCompiler constructor
doesn't blow up. We don't currently use the 'set_executables()' bureaucracy,
although it would be nice to do so for consistency with UnixCCompiler.
Greg Ward [Sun, 25 Jun 2000 02:23:11 +0000 (02:23 +0000)]
Fixed the "pre-link hook" so it actually works, mainly by renaming it
to 'msvc_prelink_hack()', adding the parameters that it actually needs,
and only calling it for MSVC compiler objects. Generally gave up on the
idea of a general "hook" mechanism: deleted the empty 'precompile_hook()'.
Greg Ward [Sun, 25 Jun 2000 02:10:46 +0000 (02:10 +0000)]
Fixed a few silly bugs in my SWIG support code. (Hey, I said it was
experimental and untested.)
Call 'customize_compiler()' after getting CCompiler object.
Greg Ward [Sun, 25 Jun 2000 02:09:14 +0000 (02:09 +0000)]
Added the 'customize_compiler()' function, which plugs in the essential
information about building Python extensions that we discovered in
Python's makefile. Currently only needed on Unix, so does nothing on
other systems.
Greg Ward [Sun, 25 Jun 2000 02:08:18 +0000 (02:08 +0000)]
Introduced some bureaucracy for setting and tracking the executables
that a particular compiler system depends on. This consists of the
'set_executables()' and 'set_executable()' methods, and a few lines in
the constructor that expect implementation classes to provide an
'executables' attribute, which we use to initialize several instance
attributes. The default implementation is somewhat biased in favour of
a Unix/DOS "command-line" view of the world, but it shouldn't be too
hard to override this for operating systems with a more sophisticated
way of representing programs-to-execute.
Greg Ward [Sun, 25 Jun 2000 02:05:29 +0000 (02:05 +0000)]
Got rid of direct dependence on the sysconfig module. Mainly, this
meant playing along with the new "dictionary of executables" scheme
added to CCompiler by adding the 'executables' class attribute, and
changing all the compile/link/etc. methods to use the new attributes
(which encapsulate both the program to run and its standard arguments,
so it was a *little* bit more than just changing some names).
Greg Ward [Sat, 24 Jun 2000 20:40:02 +0000 (20:40 +0000)]
Added 'split_quoted()' function to deal with strings that are quoted in
Unix shell-like syntax (eg. in Python's Makefile, for one thing -- now that
I have this function, I'll probably allow quoted strings in config files too.
Greg Ward [Sat, 24 Jun 2000 17:22:39 +0000 (17:22 +0000)]
Changed the default installation directory for data files (used by
the "install_data" command to the installation base, which is usually just
sys.prefix. (Any setup scripts out there that specify data files will have
to set the installation directory, relative to the base, explicitly.)
Greg Ward [Sat, 24 Jun 2000 01:23:37 +0000 (01:23 +0000)]
Changed so all the help-generating functions are defined, at module-level,
in the module of the command classes that have command-specific
help options. This lets us keep the principle of lazily importing
the ccompiler module, and also gets away from defining non-methods
at class level.
Jeremy Hylton [Fri, 23 Jun 2000 19:37:02 +0000 (19:37 +0000)]
part 2 of Neil Schemenauer's GC patches:
This patch modifies the type structures of objects that
participate in GC. The object's tp_basicsize is increased when
GC is enabled. GC information is prefixed to the object to
maintain binary compatibility. GC objects also define the
tp_flag Py_TPFLAGS_GC.
Guido van Rossum [Wed, 21 Jun 2000 20:01:10 +0000 (20:01 +0000)]
Sjoerd Mullender:
These two fixes were approved by me.
Peter Kropf:
There's a problem with the xmllib module when used with JPython. Specifically,
the JPython re module has trouble with the () characters in strings passed into
re.compile.
Spiros Papadimitriou:
I just downloaded xmllib.py ver. 0.3 from python.org and there
seems to be a slight typo: Line 654 ("tag = self.stack[-1][0]"
in parse_endtag), is indented one level more than it should be.
I just thought I'd let you know...
Greg Ward [Wed, 21 Jun 2000 03:33:03 +0000 (03:33 +0000)]
Implementation of the CCompiler class for Cygwin and Mingw32, ie. the two
major ports of GCC to Windows. Contributed by Rene Liebscher, and quite
untested by me. Apparently requires tweaking Python's installed config.h
and adding a libpython.a to build extensions.
Greg Ward [Wed, 21 Jun 2000 03:00:50 +0000 (03:00 +0000)]
Fleshed out and added a bunch of useful stuff, notably 'check_func()',
'try_cpp()', 'search_cpp()', and 'check_header()'. This is enough that
the base config is actually useful for implementing a real config
command, specifically one for mxDateTime.
Greg Ward [Wed, 21 Jun 2000 02:58:46 +0000 (02:58 +0000)]
Added 'preprocess()' method to CCompiler interface, and implemented
it in UnixCCompiler. Still needs to be implemented in MSVCCompiler (and
whatever other compiler classes are lurking out there, waiting to be
checked in).
Jeremy Hylton [Tue, 20 Jun 2000 19:10:44 +0000 (19:10 +0000)]
Add new parser error code, E_OVERFLOW. This error is returned when
the number of children of a node exceeds the max possible value for
the short that is used to count them. The Python runtime converts
this parser error into the SyntaxError "expression too long."
Mark Hammond [Tue, 20 Jun 2000 08:12:48 +0000 (08:12 +0000)]
Added a new debug method sys.gettotalrefcount(), which returns the total number of references on all Python objects. This is only enabled when Py_TRACE_REFS is defined (which includes default debug builds under Windows).
Also removed a redundant cast from sys.getrefcount(), as discussed on the patches list.
Patch from Lorenzo M. Catucci:
I discovered the [MREMAP_MAYMOVE] symbol is only defined when _GNU_SOURCE is
defined; therefore, here is the change: if we are compiling for linux,
define _GNU_SOURCE before including mman.h, and all is done.
Patch from /F:
this patch adds a fast _flatten function to the _tkinter
module, and imports it from Tkinter.py (if available).
this speeds up canvas operations like create_line and
create_polygon. for example, a create_line with 5000
vertices runs about 50 times faster with this patch in
place.
Regenerated autoconf files. There's an extra change to config.h.in beyond
the mremap() change I made; did someone modify configure.in previously
without recreating these files?
Patch from Trent Mick:
The seek() method is broken for any 'whence' value (seek from
start, current, orend) other than the default. I have a patch
that fixes that as well as gets mmap'd files working on
Linux64 and Win64.
Greg Ward [Sat, 17 Jun 2000 23:04:31 +0000 (23:04 +0000)]
Pulled the MSVC++-specific hackery out to a new method, 'prelink_hook()',
and added (empty) 'precompile_hook()' for symmetry. One can envision
a much more elaborate hook mechanism, but this looks like it'll do for
now.
Fix the size() method to return the size of the file on Unix, not the
size of the mapped area. This seems to be what the Windows version does.
This change requires keeping around the fd of the mapped file.
Vladimir MARANGOZOV <Vladimir.Marangozov@inrialpes.fr>:
This patch fixes an optimisation mystery in _PyUnicodeNew causing segfaults
on AIX when the interpreter is compiled with -O.
Greg Ward [Sat, 17 Jun 2000 01:58:14 +0000 (01:58 +0000)]
Bastian Kleineidam: added 'remove_tree()' function. Needed so that
'remove_tree()' can cooperate with 'mkpath()' in the maintenance of
the PATH_CREATED cache: specifically, if a directory is created
with 'mkpath()', later removed with 'remove_tree()', and 'mkpath()'
is again requested to create it, then it would erroneously think
the directory already existed, because it was in the PATH_CREATED
cache. The patch (slightly tweaked by me) fixes that.
Fred Drake [Thu, 15 Jun 2000 14:50:20 +0000 (14:50 +0000)]
Thomas Wouters <thomas@xs4all.net>:
The following patch adds "sq_contains" support to rangeobject, and enables
the already-written support for sq_contains in listobject and tupleobject.
The rangeobject "contains" code should be a bit more efficient than the
current default "in" implementation ;-) It might not get used much, but it's
not that much to add.
listobject.c and tupleobject.c already had code for sq_contains, and the
proper struct member was set, but the PyType structure was not extended to
include tp_flags, so the object-specific code was not getting called (Go
ahead, test it ;-). I also did this for the immutable_list_type in
listobject.c, eventhough it is probably never used. Symmetry and all that.