Commit Graph

906 Commits

Author SHA1 Message Date
Marc-André Lemburg 0375079e93 Adding Python <= 2.2 support back in. 2002-12-03 08:45:11 +00:00
Andrew M. Kuchling 8e30bcdaaf Fix mode on scripts to have the read bit set (noted by Nicholas Riley) 2002-11-29 19:45:58 +00:00
Andrew M. Kuchling 31ddfb6942 [Part of patch #641685] Add .dylib as an extension for shared libraries 2002-11-27 13:45:26 +00:00
Fred Drake 94e7bb7dd6 Use "is" to test type objects, not "==". 2002-11-26 21:28:23 +00:00
Andrew M. Kuchling acd5cb2ff0 Fix for bug #410541: bdist builds bogus .zips
This adds a --relative option to the bdist_dumb command that defaults
to false; if true, the .tar.gz or .zip will be assembled using relative
paths.
2002-11-26 17:45:19 +00:00
Andrew M. Kuchling 40f23e0ddf Part of the fix for bug #410541: add ensure_relative() function 2002-11-26 17:42:48 +00:00
Thomas Heller 450cafae28 (This is hopefully the last large, funny checkin message for
bdist_wininst.py we will see.)

Removed the base64 encoded binary contents, wininst.exe must be in the
same directory as this file now.

wininst.exe must be recompiled and commited each time the sources in
PC/bdist_wininst are changed.
2002-11-22 21:08:34 +00:00
Thomas Heller 3a23c3fae1 get_python_version was not imported. 2002-11-22 20:57:20 +00:00
Andrew M. Kuchling fec3262691 Reflow comment 2002-11-21 20:41:07 +00:00
Martin v. Löwis 69ceb33bac Patch #642019: Recognize gcc-x.y as gcc. 2002-11-21 20:33:24 +00:00
Andrew M. Kuchling cdd215789c Bug #639118 from Ollie Oldham: archiver should use zipfile before zip
Previously archive_util.py attempted to spawn an
        external 'zip' program for the zip action, if this fails, an
        attempt to import zipfile.py is made...

        This bites folks who have 'old' or non-conforming zip
        programs on windows platforms.  This change tries the 'zipfile'
        module first, falling back to spawning a zip process if
        the module isn't available.
2002-11-21 18:33:28 +00:00
Andrew M. Kuchling 2db92a6ee1 Add missing import 2002-11-20 16:10:29 +00:00
Andrew M. Kuchling d448f66317 Add comment to Distutil files about requiring 1.5.2 compatibility, as
suggested by PEP 291.
2002-11-19 13:12:28 +00:00
Andrew M. Kuchling a6483d2e9a Remove 'created by' lines; people can use CVS for this, and the information is often out of date 2002-11-14 02:25:42 +00:00
Andrew M. Kuchling f6756e8dd4 Fix docstring typo; remove 'created' line 2002-11-14 01:58:48 +00:00
Andrew M. Kuchling 1cace1a30a [Bug #550364] Use sysconfig.get_python_version() 2002-11-14 01:44:35 +00:00
Andrew M. Kuchling 0ff98b9346 [Bug #550364] Add get_python_version() 2002-11-14 01:43:00 +00:00
Andrew M. Kuchling 9a38dcf057 [Bug #599248] ext module generation problem
If you have source files srcdir1/foo.c and srcdir2/foo.c, the
temporary .o for both files is written to build/temp.<platform>/foo.o.
This patch sets strip_dir to false for both calls to object_filename,
so now the object files are written to temp.<platform>/srcdir1/foo.o
and .../srcdir2/foo.o.

2.2 bugfix candidate
2002-11-14 01:29:00 +00:00
Andrew M. Kuchling 3f1c9a916f Allow unknown keyword arguments to the Extension class, and warn about them. 2002-11-13 20:54:21 +00:00
Andrew M. Kuchling 33635aaf93 Back out part of rev. 1.53, restoring the use of the string module.
The two long lines have been reflowed differently; hopefully someone on
BeOS can test them.  Rev. 1.53 also converted string.atoi() to int(); I've
left that alone.
2002-11-13 17:03:05 +00:00
Andrew M. Kuchling 8557156717 Update file 2002-11-13 13:26:59 +00:00
Andrew M. Kuchling 91e77536e8 [Bug #233259] Ugly traceback for DistutilsPlatformError
Fixed by catching all exceptions that are subclasses of DistutilsError,
  so only the error message will be printed.  You can still get the
  whole traceback by enabling the Distutils debugging mode.
2002-11-08 16:18:24 +00:00
Andrew M. Kuchling 706867c20c Fix comment typo 2002-11-08 15:11:42 +00:00
Thomas Heller 492620ae5e Use dynamic linking for the SHGetSpecialFolderPath function, it is not
always available on Windows NT. When the function cannot be loaded,
get_special_folder_path raises OSError, "function not available".

Compiled the exe, and rebuilt bdist_wininst.py.
2002-11-07 16:46:19 +00:00
Thomas Heller 8560bb8167 Fix a small bug when sys.argv[0] has an absolute path.
See http://mail.python.org/pipermail/distutils-sig/2002-November/003039.html
2002-11-07 16:41:38 +00:00
Gustavo Niemeyer fbceb01ef0 Fixed bug "[#466200] ability to specify a 'verify' script".
* Lib/distutils/command/bdist_rpm.py
  (bdist_rpm.initialize_options): Included verify_script attribute.
  (bdist_rpm.finalize_package_data): Ensure that verify_script is a filename.
  (bdist_rpm._make_spec_file): Included verify_script in script_options
  tuple.

* Misc/NEWS
  Mention change.
2002-11-06 18:44:26 +00:00
Jeremy Hylton cd8fdbb3fa Repair inconsistent use of tabs and spaces. 2002-11-05 20:27:17 +00:00
Jeremy Hylton a5f4c071b5 Remove use of string module and reflow a couple of long lines. 2002-11-05 20:11:08 +00:00
Gustavo Niemeyer 6b016852f8 This patch fixes the following bugs:
[#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.

  (CCompiler.create_static_lib, CCompiler.link, CCompiler.link_executable,
   CCompiler.link_shared_object, CCompiler.link_shared_lib):
  Inlcuded target_lang parameter.

* 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().
2002-11-05 16:12:02 +00:00
Thomas Heller d7c14c6c9b Must now give the basename - not including directories - of the
install-script on the command line.

Recreated after recompilation of wininst.exe.
2002-11-05 10:06:19 +00:00
Andrew M. Kuchling 29c8623e5c [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.
2002-11-04 19:53:24 +00:00
Andrew M. Kuchling 47ca2bc661 [Patch #588809] Remove check of environment variables; sysconfig.py will do that now 2002-11-04 19:50:03 +00:00
Andrew M. Kuchling e2d1214c42 [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.
2002-11-04 14:27:43 +00:00
Andrew M. Kuchling 33a5edf89c 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.)
2002-11-04 13:45:15 +00:00
Andrew M. Kuchling b6c316f134 [Bug #570655] Fix misleading option text 2002-11-04 13:33:07 +00:00
Thomas Heller 05c9335659 Fixes SF bug#614051: win32 build_ext problem. 2002-10-31 14:26:37 +00:00
Andrew M. Kuchling ccf4e421b8 Catch only ImportError 2002-10-31 13:39:33 +00:00
Andrew M. Kuchling ff4ad9a1ce 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.
2002-10-31 13:22:41 +00:00
Thomas Heller 5b1614d568 Recreated after source changes. 2002-10-16 17:51:38 +00:00
Thomas Heller 0cf4269862 Recreated after source changes. 2002-10-15 19:45:25 +00:00
Thomas Heller d98d25e22d Revert the previous checkin - it didn't work anyway. 2002-10-15 14:51:58 +00:00
Skip Montanaro 628e3bf6cf MacOSX linker doesn't understand -R flag at all, no matter how you feed it
the flag.  Punt and return a -L flag instead (returning "" gums up the
command to be forked).
2002-10-09 21:37:18 +00:00
Martin v. Löwis bb20bb6bdb Patch #619493: Prefer rpmbuild over rpm if available. Backported to 2.2. 2002-10-07 05:57:21 +00:00
Marc-André Lemburg c7cdd7182a Pulling Mark Alexander's contribution from CVS. 2002-10-04 09:30:06 +00:00
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