Commit Graph

862 Commits

Author SHA1 Message Date
Skip Montanaro 70e1d9b59d save the verbose argument as an instance attributes. Subclasses of
CCompiler may rely on the presence of self.verbose (SciPy's distutils
appears to).
2002-10-01 17:39:59 +00:00
Guido van Rossum cc3a6df506 Commit fix for SF 603831.
Strangely, two out of three patches there seem already committed; but
the essential one (get rid of the assert in object_filenames in
ccompiler.py) was not yet applied.

This makes the build procedure for Twisted work again.

This is *not* a backport candidate despite the fact that identical
code appears to exist in 2.2.2; Twisted builds fine there, so there
must have been a change elsewhere.
2002-10-01 04:14:17 +00:00
Guido van Rossum bffa52f07f Whitespace normalization (get rid of tabs). 2002-09-29 00:25:51 +00:00
Jeremy Hylton fcd7353863 Use distutils.debug.DEBUG instead of distutils.core.DEBUG.
Note that distutils.core.DEBUG still works if client code uses it, but
the core code avoids circular references by using distutils.debug.
2002-09-11 16:31:53 +00:00
Jeremy Hylton 5f6228ed46 Define DEBUG in a separate module to resolve circular references. 2002-09-11 16:28:52 +00:00
Andrew M. Kuchling df453fd026 The .preprocess() method didn't work, because it didn't add the input file
to the command-line arguments.  Fix this by adding the source filename.
2002-09-09 12:16:58 +00:00
Andrew M. Kuchling 4013cbd06b Include an empty body when checking for a header file
(Bugfix candidate for 2.2, and likely 2.1 as well)
2002-09-09 12:10:00 +00:00
Neal Norwitz b0df6a1afa SF bug #574235, convert_path fails with empty pathname 2002-08-13 17:42:57 +00:00
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