summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/cygwinccompiler.py
Commit message (Collapse)AuthorAgeFilesLines
* Patch #709178: remove -static option from cygwinccompilerJason Tishler2003-04-141-5/+30
| | | | | | | | | | | | | | After some more reflection (and no negative feedback), I am reverting the original patch and applying my version, cygwinccompiler.py-shared.diff, instead. My reasons are the following: 1. support for older toolchains is retained 2. support for new toolchains (i.e., ld -shared) is added The goal of my approach is to avoid breaking older toolchains while adding better support for newer ones.
* Patch #718551: cygwinccompiler.get_versions() patchJason Tishler2003-04-091-3/+3
| | | | | | | | | | The cygwinccompiler.get_versions() function only handles versions numbers of the form "x.y.z". The attached patch enhances get_versions() to handle "x.y" too (i.e., the ".z" is optional). This change causes the unnecessary "--entry _DllMain@12" link option to be suppressed for recent Cygwin and Mingw toolchains. Additionally, it directs recent Mingw toolchains to use gcc instead of dllwrap during linking.
* Patch #709178: remove -static option from cygwinccompilerJason Tishler2003-04-091-8/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Currently, the cygwinccompiler.py compiler handling in distutils is invoking the cygwin and mingw compilers with the -static option. Logically, this means that the linker should choose to link to static libraries instead of shared/dynamically linked libraries. Current win32 binutils expect import libraries to have a .dll.a suffix and static libraries to have .a suffix. If -static is passed, it will skip the .dll.a libraries. This is pain if one has a tree with both static and dynamic libraries using this naming convention, and wish to use the dynamic libraries. The -static option being passed in distutils is to get around a bug in old versions of binutils where it would get confused when it found the DLLs themselves. The decision to use static or shared libraries is site or package specific, and should be left to the setup script or to command line options.
* Add comment to Distutil files about requiring 1.5.2 compatibility, asAndrew M. Kuchling2002-11-191-0/+2
| | | | suggested by PEP 291.
* Remove 'created by' lines; people can use CVS for this, and the information ↵Andrew M. Kuchling2002-11-141-2/+0
| | | | is often out of date
* This patch fixes the following bugs:Gustavo Niemeyer2002-11-051-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [#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().
* Add implementation of _compile() and use default compile() method.Jeremy Hylton2002-06-181-31/+14
|
* Refactor compile() method implementations.Jeremy Hylton2002-06-131-56/+29
| | | | | | | | 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.
* Fix unused local variables caught by pychecker.Jeremy Hylton2002-06-041-5/+2
| | | | | Fixes a bug for Solaris pkgtool (bdist_pkgtool) that would have prevented it from building subpackages.
* Make setup.py less chatty by default.Jeremy Hylton2002-06-041-1/+2
| | | | | | | | | | | | | | | 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.
* Whitespace normalization.Fred Drake2001-12-061-49/+48
|
* Patch #411138: Rename config.h to pyconfig.h. Closes bug #231774.Martin v. Löwis2001-07-261-8/+8
|
* Remove redundant importAndrew M. Kuchling2001-03-221-1/+1
|
* Back out conversion to string methods; the Distutils is intended to workAndrew M. Kuchling2001-03-221-3/+3
| | | | with 1.5.2
* String method conversion.Eric S. Raymond2001-02-091-3/+3
|
* Update the code to better reflect recommended style:Fred Drake2000-12-121-1/+1
| | | | | Use != instead of <> since <> is documented as "obsolescent". Use "is" and "is not" when comparing with None or type objects.
* Big patch from Rene Liebscher to simplify the CCompiler API andGreg Ward2000-09-271-67/+163
| | | | | | | | | | | | | | | | | | | | implementations. Details: * replace 'link_shared_object()', 'link_shared_lib()', and 'link_executable()' with 'link()', which is (roughly) the union of the three methods it replaces * in all implementation classes (UnixCCompiler, MSVCCompiler, etc.), ditch the old 'link_*()' methods and replace them with 'link()' * in the abstract base class (CCompiler), add the old 'link_*()' methods as wrappers around the new 'link()' (they also print a warning of the deprecated interface) Also increases consistency between MSVCCompiler and BCPPCompiler, hopefully to make it easier to factor out the mythical WindowsCCompiler class. Details: * use 'self.linker' instead of 'self.link' * add ability to compile resource files to BCPPCompiler * added (redundant?) 'object_filename()' method to BCPPCompiler * only generate a .def file if 'export_symbols' defined
* Rene Liebscher: comment fixes.Greg Ward2000-09-011-2/+2
|
* Overhauld 'check_config_h()': now returns a (status, details) tuple,Greg Ward2000-08-131-26/+45
| | | | and is much better documented to boot.
* Rene Liebscher:Greg Ward2000-08-131-18/+23
| | | | | | | | | * use self.debug_print() for debug messages * uses now copy.copy() to copy lists * added 'shared_lib_extension=".dll"', ... , this is necessary if you want use the compiler class outside of the standard distutils build process. * changed result type of check_config_h() from int to string
* Latest version from Rene Liebscher; major changes:Greg Ward2000-08-021-107/+230
| | | | | | | | | | | - added big comment describing possible problems - look for and react to versions of gcc, ld, and dlltool; mainly this is done by the 'get_versions()' function and the CygwinCCompiler and Mingw32CCompiler constructors - move 'check_config_h()' to end of file and defer calling it until we need to (ie. in the CygwinCCompiler constructor) - lots of changes in 'link_shared_object()' -- mostly seems to be library and DLL stuff, but I don't follow it entirely
* Fixed a grab-bag of typos spotted by Rob Hooft.Greg Ward2000-07-271-1/+1
|
* Cleaned up and reformatted by Rene Liebscher.Greg Ward2000-06-291-95/+113
| | | | | More reformatting by me. Also added some editorial comments.
* Implementation of the CCompiler class for Cygwin and Mingw32, ie. the twoGreg Ward2000-06-211-0/+181
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.