Commit Graph

854 Commits

Author SHA1 Message Date
Guido van Rossum
3b0a3293c3 Massive changes from SF 589982 (tempfile.py rewrite, by Zack
Weinberg).  This changes all uses of deprecated tempfile functions to
the recommended ones.
2002-08-09 16:38:32 +00:00
Andrew MacIntyre
4104db39b8 - comment improvement
- implement viable library search routine for EMX
2002-08-04 06:21:25 +00:00
Andrew MacIntyre
428a38c002 add parameter missing following Jeremy's compiler class refactoring 2002-08-04 06:17:08 +00:00
Thomas Heller
f4ad4ce5a0 Recompiled the exe and updated bdist_wininst.py. 2002-07-29 12:11:18 +00:00
Martin v. Löwis
e567114e47 Patch #543498: Use License: field instead of Copyright:. 2002-07-28 10:49:37 +00:00
Michael W. Hudson
6b7d69d9b4 Well, Fred never did explain why the code to determine whether the
calling Python was installed was so complicated, so I simplified it.

This should get the snake-farm's build scripts working again.
2002-07-12 09:16:44 +00:00
Jack Jansen
2bb598067a The standard definition file is now called mwerks_shcarbon_plugin.h. 2002-06-27 22:10:19 +00:00
Neal Norwitz
80a3e0a604 Whitespace normalization (remove tabs) 2002-06-26 22:05:33 +00:00
Jack Jansen
ab5320bfd9 Fixed various MacPython-specific issues found by attempting to use the standard core setup.py for MacPython. 2002-06-26 15:42:49 +00:00
Jack Jansen
96cad2ea47 This module broke on the Mac (where it can't work, but distutils seems to import it anyway) because it imported pwd and grp. Moved the import to inside the routine where they're used. 2002-06-26 15:00:29 +00:00
Jeremy Hylton
2683ac755d Define NDEBUG for releae builds, just like Python.
XXX Why doesn't distutils on Windows use the same set of flags as Python?
2002-06-18 19:08:40 +00:00
Jeremy Hylton
1b046e4314 Add implementation of _compile() and use default compile() method. 2002-06-18 18:48:55 +00:00
Jeremy Hylton
6e08d22b1a Add a default implementation of compile() to the base class.
The default implementation calls _compile() to compile individual
files.  This method must be implemented by the subclass.  This change
factors out most of the remaining common code in all the compilers
except mwerks.
2002-06-18 18:42:41 +00:00
Jeremy Hylton
c01b350d36 Only import msvccompiler on win32 platforms. 2002-06-18 18:40:54 +00:00
Jeremy Hylton
c18fde5d82 Extend dependency tracking so that .o files are rebuilt.
Two new tests are needed:

Don't skip building an extension if any of the depends files are newer
than the target.

Pass ext.depends to compiler.compile() so that it can track individual
files.
2002-06-13 17:32:20 +00:00
Jeremy Hylton
1bba31d9a2 Refactor compile() method implementations.
Always use _setup_compile() to do the grunt work of processing
arguments, figuring out which files to compile, and emitting debug
messages for files that are up-to-date.

Use _get_cc_args() when possible.
2002-06-13 17:28:18 +00:00
Jeremy Hylton
6864d30dfe Add depends=None to the arglist for compile(). 2002-06-13 17:27:13 +00:00
Jeremy Hylton
59b103cf87 Extend compiler() method with optional depends argument.
This change is not backwards compatible.  If a compiler subclass
exists outside the distutils package, it may get called with the
unexpected keyword arg.  It's easy to extend that compiler by having
it ignore the argument, and not much harder to do the right thing.  If
this ends up being burdensome, we can change it before 2.3 final to
work harder at compatibility.

Also add _setup_compile() and _get_cc_args() helper functions that
factor out much of the boilerplate for each concrete compiler class.
2002-06-13 17:26:30 +00:00
Jeremy Hylton
129b17d538 More style changes and little cleanups.
Remove __init__ that just called base class __init__ with same args.
Fold long argument lists into fewer, shorter lines.
Remove parens in tuple unpacks.
Don't put multiple statements on one line with a semicolon.
In find_library_file() compute the library_filename() upfront.
2002-06-13 15:14:10 +00:00
Jeremy Hylton
022640dea0 Some more style improvements 2002-06-13 15:01:38 +00:00
Jeremy Hylton
28f46e1839 Python style conformance: Delete spaces between name of function and arglist.
Making the world better a little bit at a time <wink>.
2002-06-13 14:58:30 +00:00
Jeremy Hylton
09e532bcec Add a new definition to Extension objects: depends.
depends is a list of files that the target depends, but aren't direct
sources of the target.  think .h files.
2002-06-12 20:08:56 +00:00
Martin v. Löwis
f90ae20354 Patch #488073: AtheOS port. 2002-06-11 06:22:31 +00:00
Jeremy Hylton
a683233d87 Change warning to debug level; it's a very minor issue.
The specific warning is that clean didn't find a directory that should
be removed if it exists.
2002-06-06 14:54:56 +00:00
Jeremy Hylton
dc8412e541 Move warning about directory not on sys.path to debug level.
Fix a bunch of multiline string constants that used +.
2002-06-04 21:20:08 +00:00
Jeremy Hylton
8f787bf1d0 Test changes before checking them in. 2002-06-04 21:11:56 +00:00
Jeremy Hylton
40ebbeff23 Track extra arg to option_table to all uses of it 2002-06-04 21:10:35 +00:00
Jeremy Hylton
6b3996b2b9 Replace bogus bare variables with attribute access. 2002-06-04 21:06:16 +00:00
Jeremy Hylton
115fdc614f Define DEBUG as early as possible to avoid import problems. 2002-06-04 21:05:05 +00:00
Jeremy Hylton
4f2f1335a8 Add missing import of log. 2002-06-04 21:04:03 +00:00
Jeremy Hylton
7146073850 Use module-level import of DEBUG instead of many function-level imports. 2002-06-04 21:02:26 +00:00
Jeremy Hylton
fc861bab92 Remove unused imports 2002-06-04 21:00:33 +00:00
Jeremy Hylton
11a52708f7 Make None return explicit 2002-06-04 21:00:20 +00:00
Jeremy Hylton
c58e984837 import base64 at the top to avoid two different imports at other times 2002-06-04 20:55:10 +00:00
Jeremy Hylton
ec772744c7 ensure_filename() only takes one argument.
Call ensure_string() with one arg too, since the second value passed
was the default.
2002-06-04 20:45:17 +00:00
Jeremy Hylton
adb2b38543 Reindent lines to improve readability 2002-06-04 20:42:41 +00:00
Jeremy Hylton
711f91cf83 Remove (commented out) options that have moved into the distribution. 2002-06-04 20:40:03 +00:00
Jeremy Hylton
d003abccc7 get_script() implicitly returned None and also had explicit returns.
Make all returns explicit and rearrange logic to avoid extra
indentation.
2002-06-04 20:39:34 +00:00
Jeremy Hylton
d53f6e43e7 global _option_order is not used 2002-06-04 20:35:10 +00:00
Jeremy Hylton
e6f40ea4b6 Fix bug in recent change to logging code.
mode is not computed in dry_run mode, so it can't be included in the
log message.
2002-06-04 20:30:10 +00:00
Jeremy Hylton
a2f9989c1a Fix unused local variables caught by pychecker.
Fixes a bug for Solaris pkgtool (bdist_pkgtool) that would have
prevented it from building subpackages.
2002-06-04 20:26:44 +00:00
Jeremy Hylton
a181ec07af Set repeat metadata for an option based on repeat local var not
constant.
2002-06-04 20:24:05 +00:00
Jeremy Hylton
332a146127 Remove unused imports caught by pychecker 2002-06-04 20:18:24 +00:00
Jeremy Hylton
cd8a1148e1 Make setup.py less chatty by default.
This is a conservative version of SF patch 504889.  It uses the log
module instead of calling print in various places, and it ignores the
verbose argument passed to many functions and set as an attribute on
some objects.  Instead, it uses the verbosity set on the logger via
the command line.

The log module is now preferred over announce() and warn() methods
that exist only for backwards compatibility.

XXX This checkin changes a lot of modules that have no test suite and
aren't exercised by the Python build process.  It will need
substantial testing.
2002-06-04 20:14:43 +00:00
Jeremy Hylton
6fa82a3477 A simple log mechanism styled after the proposed std library module 2002-06-04 20:00:26 +00:00
Jeremy Hylton
e22bc1e841 The comment said:
# XXX this isn't used anywhere, and worse, it has the same name as a method
 # in Command with subtly different semantics.  (This one just has one
 # source -> one dest; that one has many sources -> one dest.)  Nuke it?

Yes.  Nuke it.
2002-06-04 18:55:54 +00:00
Fred Drake
16c8d702a4 When using a Python that has not been installed to build 3rd-party
modules, distutils does not understand that the build version of the
source tree is needed.

This patch fixes distutils.sysconfig to understand that the running
Python is part of the build tree and needs to use the appropriate
"shape" of the tree. This does not assume anything about the current
directory, so can be used to build 3rd-party modules using Python's
build tree as well.

This is useful since it allows us to use a non-installed debug-mode
Python with 3rd-party modules for testing. It as the side-effect that
set_python_build() is no longer needed (the hack which was added to
allow distutils to be used to build the "standard" extension modules).

This closes SF patch #547734.
2002-06-04 15:28:21 +00:00
Andrew M. Kuchling
8c20916de2 Remove unneeded import 2002-05-30 19:15:16 +00:00
Andrew M. Kuchling
0b5c11252d Prevent convert_path from crashing if the path is an empty string. Bugfix candidate. 2002-05-06 13:57:19 +00:00
Thomas Heller
69d31b749d Pass the full pathname to MSVC when compiling a debug version. This
allows the debugger to find the source without asking the user to
browse for it.
2002-04-25 17:29:45 +00:00