[#413582] g++ must be called for c++ extensions
[#454030] distutils cannot link C++ code with GCC
topdir = "Lib/distutils"
* bcppcompiler.py
(BCPPCompiler.create_static_lib): Fixed prototype, removing extra_preargs
and extra_postargs parameters. Included target_lang parameter.
(BCPPCompiler.link): Included target_lang parameter.
* msvccompiler.py
(MSVCCompiler.create_static_lib): Fixed prototype, removing extra_preargs
and extra_postargs parameters. Included target_lang parameter.
(MSVCCompiler.link): Included target_lang parameter.
* ccompiler.py
(CCompiler): New language_map and language_order attributes, used by
CCompiler.detect_language().
(CCompiler.detect_language): New method, will return the language of
a given source, or list of sources. Individual source language is
detected using the language_map dict. When mixed sources are used,
language_order will stablish the language precedence.
* cygwinccompiler.py
(CygwinCCompiler.link): Included target_lang parameter.
* emxccompiler.py
(EMXCCompiler.link): Included target_lang parameter.
* mwerkscompiler.py
(MWerksCompiler.link): Included target_lang parameter.
* extension.py
(Extension.__init__): New 'language' parameter/attribute, initialized
to None by default. If provided will overlap the automatic detection
made by CCompiler.detect_language(), in build_ext command.
* sysconfig.py
(customize_compiler): Check Makefile for CXX option, and also the
environment variable CXX. Use the resulting value in the 'compiler_cxx'
parameter of compiler.set_executables().
* unixccompiler.py
(UnixCCompiler): Included 'compiler_cxx' in executables dict, defaulting
to 'cc'.
(UnixCCompiler.create_static_lib): Included target_lang parameter.
(UnixCCompiler.link): Included target_lang parameter, and made
linker command use compiler_cxx, if target_lang is 'c++'.
* command/build_ext.py
(build_ext.build_extension): Pass new ext.language attribute
to compiler.link_shared_object()'s target_lang parameter. If
ext.language is not provided, detect language using
compiler.detect_language(sources) instead.
* command/config.py
(config._link): Pass already available lang parameter as target_lang
parameter of compiler.link_executable().
Tim Peters [Tue, 5 Nov 2002 03:49:09 +0000 (03:49 +0000)]
This stopped working on Windows, due to a reference to the non-existent
_locale.getdefaultlocale. Guessing a leading underscore was intended,
but don't really understood this stuff (locale looks like Spanish for
the opposite of global to me <wink>).
[Patch #588809] LDFLAGS support for build_ext.py, from Robert Weber
customize_compiler() now looks at various environment variables and uses
their values to override the configured C compiler/preprocessor/linker
binary and flags.
Tim Peters [Mon, 4 Nov 2002 19:50:11 +0000 (19:50 +0000)]
Related to SF patch 618135: gzip.py and files > 2G.
Fixed the signed/unsigned confusions when dealing with files >= 2GB.
4GB is still a hard limitation of the gzip file format, though.
Testing this was a bitch on Win98SE due to frequent system freezes. It
didn't freeze while running gzip, it kept freezing while trying to *create*
a > 2GB test file! This wasn't Python's doing. I don't know of a
reasonable way to test this functionality in regrtest.py, so I'm not
checking in a test case (a test case would necessarily require creating
a 2GB+ file first, using gzip to zip it, using gzip to unzip it again,
and then compare before-and-after; so >4GB free space would be required,
and a loooong time; I did all this "by hand" once).
[Bug #620630] Flush stdout after logging every message. Without it,
when output is redirected to a file, compiler error messages show
up before Distutils prints the command being invoked.
Add get_distutil_options(); future setup.py files can use this to check
whether the Distutils being used supports a particularly capability.
(This idea was originally suggested by Juergen Hermann as a method
on the Distribution class. I think it makes more sense as a
function in core.py, and that's what this patch implements.)
Add "select all" by clicking on (0,0) cell.
Redo setting the selection and setting the beacon to deal better
with rows or columns -- these are now expressed by range (1, sys.maxint).
Major breakthrough in selection -- drag-select multiple cells now
works. Also row and column selection works (sort of). The DEL
key deletes the selected rectangle. sys.argv[1] used by test_gui().
Fred Drake [Fri, 1 Nov 2002 21:33:44 +0000 (21:33 +0000)]
Update example for the type() function to use the currently accepted
preference of using "is" instead of "==" to compare types, use
built-in names where available, and point to the isinstance()
function.
Closes SF bug #632196.
Make the Distribution() constructor forgiving of unknown keyword
arguments, triggering a warning instead of raising an exception. (In
1.5.2/2.0, it will print to stderr.)
Bugfix candidate for all previous versions. This changes behaviour,
but the old behaviour wasn't very useful. If Distutils version X+1
adds a new keyword argument, using the new keyword means your setup.py
file won't work with Distutils version X any more.
Fred Drake [Wed, 30 Oct 2002 18:17:03 +0000 (18:17 +0000)]
Add notes to the asctime() and ctime() descriptions to make it
explicit that locale information is not used. There wasn't anything
that implied it was, but this has confused users.
Jack Jansen [Tue, 29 Oct 2002 22:48:43 +0000 (22:48 +0000)]
Forward port of 1.12.14.3 (which has an incorrect log message):
if SetDates() in touched() returns an error ignore it: the user may not have
permission to change the parent folder. This is a non-serious problem,
the only function of touched() is to speed up the finder seeing the
change.
Fred Drake [Mon, 28 Oct 2002 19:28:22 +0000 (19:28 +0000)]
Chapter titles that get split over multiple lines in the typeset
formats can't have whitespace after the last non-blank character (bug
in LaTeX?); fix up a couple of instances of this.
Fred Drake [Mon, 28 Oct 2002 17:58:48 +0000 (17:58 +0000)]
Add a test of interaction between & and extra replacements.
Remove extra noise from the output when there are no errors, and say more
in the exception when there are errors.
Fred Drake [Mon, 28 Oct 2002 17:29:01 +0000 (17:29 +0000)]
Avoid calling __dict_replace() if we don't need to -- the call is much
more expensive than just doing to work needed, and these things seem
to always turn into a bottleneck eventually.
Skip Montanaro [Sun, 27 Oct 2002 01:59:21 +0000 (01:59 +0000)]
Change PyOS_Readline declaration to match the recent change to myreadline.c
(see Patch 512981). I changed stdin to sys_stdin in the body of the
function, but did not change stderr to sys_stdout, though I suspect that may
be the correct course. I don't know the code involved well enough to judge.