summaryrefslogtreecommitdiff
path: root/Lib/distutils/ccompiler.py
Commit message (Collapse)AuthorAgeFilesLines
* closes bpo-37965: Fix compiler warning of distutils CCompiler.test_function. ↵Miss Islington (bot)2019-08-281-1/+2
| | | | | | | | | | | | (GH-15560) https://bugs.python.org/issue37965 https://bugs.python.org/issue37965 Automerge-Triggered-By: @benjaminp (cherry picked from commit 55aabee07501e1468082b3237620e4ecd75c5da6) Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com>
* bpo-31955: Fix distutils CCompiler.set_executable() for Unicode (GH-4316)Mazay02017-11-081-1/+1
| | | Fix CCompiler.set_executable() of distutils to handle properly Unicode strings.
* Issue #25136: Support Apple Xcode 7's new textual SDK stub libraries.Ned Deily2016-02-251-2/+3
| | | | | | | | | | | | | | | As of Xcode 7, SDKs for Apple platforms now include textual-format stub libraries whose file names have a .tbd extension rather than the standard OS X .dylib extension. The Apple compiler tool chain handles these stub libraries transparently and the installed system shared libraries are still .dylibs. However, the new stub libraries cause problems for third-party programs that support building with Apple SDKs and make build-time decisions based on the presence or paths of system-supplied shared libraries in the SDK. In particular, building Python itself with an SDK fails to find system-supplied libraries during setup.py's build of standard library extension modules. The solution is to have find_library_file() in Distutils search for .tbd files, along with the existing types (.a, .so, and .dylib). Patch by Tim Smith.
* fix name of argument in docstring and the docs (closes #25076)Benjamin Peterson2015-09-121-1/+1
| | | | Patch by TAKASE Arihiro.
* Add alias to restore 2.7.2 compatibility for setup scripts (#13994).Éric Araujo2013-02-031-0/+2
| | | | | | | | | | The customize_compiler function moved many times during the 2.7 series; in 2.7.3, setup scripts importing this function from ccompiler were broken. This commit restores compatibility without reintroducing the issue that #13994 originally fixed (duplication of the function). A unit test makes little sense here, as distutils tests never do imports in functions, and the fix is very simple.
* Issue #13994: Earler partial revert of Distutils enhancements in 2.7Ned Deily2012-02-111-52/+0
| | | | | | | | has left two versions of customize_compiler, the original in distutils.sysconfig and another copy in distutils.ccompiler, with some parts of distutils calling one and others using the other. Complete the revert back to only having one in distutils.sysconfig as is the case in 3.x.
* Merged revisions 86223-86224,86226,86234 via svnmerge fromÉric Araujo2010-11-061-4/+6
| | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r86223 | eric.araujo | 2010-11-06 00:51:56 +0100 (sam., 06 nov. 2010) | 2 lines Always close files in distutils code and tests (#10252). ........ r86224 | eric.araujo | 2010-11-06 00:58:34 +0100 (sam., 06 nov. 2010) | 2 lines Add missing entry for r86223. ........ r86226 | eric.araujo | 2010-11-06 00:59:32 +0100 (sam., 06 nov. 2010) | 2 lines Of course, I forgot one file in r86223. ........ r86234 | eric.araujo | 2010-11-06 03:10:32 +0100 (sam., 06 nov. 2010) | 2 lines Also close file descriptors from os.popen and subprocess.Popen ........
* taking sysconfig out of distutilsTarek Ziadé2010-01-231-0/+52
|
* module cleanupTarek Ziadé2010-01-111-148/+69
|
* Fixed #5372: .o files are now always rebuilt because file age test don't ↵Tarek Ziadé2010-01-111-94/+2
| | | | work in some case
* massive import cleaning in DistutilsTarek Ziadé2009-12-211-19/+21
|
* starting distutils.ccompiler test coverage and cleanupTarek Ziadé2009-06-161-22/+20
|
* Fix bootstrapping by removing uses of the copy module in distutilsAntoine Pitrou2009-05-151-6/+5
|
* Issue #5052: removed backward compatibility information (out of date)Tarek Ziadé2009-01-251-2/+0
|
* Fixed #4863: removed distutils.mwerkscompilerTarek Ziadé2009-01-251-3/+0
|
* #1030250: correctly pass the dry_run option to the mkpath() function.Amaury Forgeot d'Arc2008-12-111-1/+1
|
* Removed uses of dict.has_key() from distutils, and uses ofGuido van Rossum2008-02-211-1/+1
| | | | | | callable() from copy_reg.py, so the interpreter now starts up without warnings when '-3' is given. More work like this needs to be done in the rest of the stdlib.
* Fix distutils so that libffi will cross-compile between darwin/x86 and ↵Bob Ippolito2006-05-261-4/+2
| | | | darwin/ppc
* Update compatibility comments to 2.1, corresponding to PEP 291 1.13.Martin v. Löwis2004-11-101-1/+1
|
* Patch #973204: Use -rpath instead of -R on Irix and Tru64.Martin v. Löwis2004-08-291-1/+5
|
* Whitespace normalization, via reindent.py.Tim Peters2004-07-181-2/+2
|
* Compile the files in the same order they are passed to the compiler.Thomas Heller2003-12-051-1/+5
| | | | | | | | | Use case: Sometimes 'compiling' source files (with SWIG, for example) creates additionl files which included by later sources. The win32all setup script requires this. There is no SF item for this, but it was discussed on distutils-sig: http://mail.python.org/pipermail/distutils-sig/2003-November/003514.html
* new method: has_function() - returns a boolean indicating whether theSkip Montanaro2003-04-241-0/+45
| | | | argument function is available on the current platform
* [Bug #668662] Patch from Pearu Pearson: if a C source file isAndrew M. Kuchling2003-02-261-0/+2
| | | | | | | specified with an absolute path, the object file is also written to an absolute path. The patch drops the drive and leading '/' from the source path, so a path like /path/to/foo.c results in an object file like build/temp.i686linux/path/to/foo.o.
* Bug #599248: strip directories when building Python. Out-of-tree builds ↵Andrew M. Kuchling2002-12-291-2/+5
| | | | should work again.
* 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
* [Bug #599248] ext module generation problemAndrew M. Kuchling2002-11-141-2/+2
| | | | | | | | | | 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
* Repair inconsistent use of tabs and spaces.Jeremy Hylton2002-11-051-1/+1
|
* This patch fixes the following bugs:Gustavo Niemeyer2002-11-051-8/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [#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().
* save the verbose argument as an instance attributes. Subclasses ofSkip Montanaro2002-10-011-0/+1
| | | | | CCompiler may rely on the presence of self.verbose (SciPy's distutils appears to).
* Commit fix for SF 603831.Guido van Rossum2002-10-011-1/+2
| | | | | | | | | | | | 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.
* Use distutils.debug.DEBUG instead of distutils.core.DEBUG.Jeremy Hylton2002-09-111-1/+1
| | | | | Note that distutils.core.DEBUG still works if client code uses it, but the core code avoids circular references by using distutils.debug.
* Add a default implementation of compile() to the base class.Jeremy Hylton2002-06-181-1/+20
| | | | | | | 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.
* Extend compiler() method with optional depends argument.Jeremy Hylton2002-06-131-74/+168
| | | | | | | | | | | | 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.
* Make setup.py less chatty by default.Jeremy Hylton2002-06-041-9/+10
| | | | | | | | | | | | | | | 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.
* Fix trivial typo.Thomas Heller2002-04-251-1/+1
|
* OS/2 patches by Andrew I MacIntyre for distutils.Marc-André Lemburg2002-01-311-0/+3
| | | | Closes patch #435381.
* Whitespace normalization.Fred Drake2001-12-061-17/+17
|
* Patch by Bill Noon: added 'dylib' as a library type along withJack Jansen2001-08-271-2/+2
| | | | | 'static' and 'shared'. This fixes extension building for dynamic Pythons on MacOSX.
* Patch #403947: On Cygwin, use the Unix compiler class, and notAndrew M. Kuchling2001-02-271-1/+4
| | | | | | | | | | the Cygwin-specific compiler class. (According to Jason Tishler, cygwinccompiler needs some work to handle the differences in Cygwin- and MSVC-Python. Makefile and config files are currently ignored by cygwinccompiler, as it was written to support cygwin for extensions which are intended to be used with the standard MSVC built Python.)
* This patch makes the default compiler determination more flexibleMarc-André Lemburg2001-02-191-8/+40
| | | | | | | | | | | | and also takes the sys.platform name into account. This helps on platforms where there are multiple possible compiler backends (the one with which Python itself was compiled is preferred over others in this case). The patch uses this new technique to enable using cygwin compiler per default for cygwin compiled Pythons. Written by Marc-Andre Lemburg. Copyright assigned to Guido van Rossum.
* Add strip_dir argument to the single call to .object_filenames(), toAndrew M. Kuchling2001-01-161-0/+1
| | | | | prevent creating files such as build/lib.whatever/Modules/foo.o when given a source filename such as Modules/foo.c.
* Fix from Jack Jansen for the Mac and the Metrowerks compiler, postedAndrew M. Kuchling2001-01-151-0/+3
| | | | | to the Distutils-SIG and archived at http://mail.python.org/pipermail/distutils-sig/2000-November/001755.html
* Remove deprecation warnings on old 'link_*()' methods, ie. they're notGreg Ward2000-09-271-11/+5
| | | | | deprecated after all. But now they're only implemented once, instead of N times.
* Big patch from Rene Liebscher to simplify the CCompiler API andGreg Ward2000-09-271-39/+72
| | | | | | | | | | | | | | | | | | | | 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
* Added 'debug_print()'.Greg Ward2000-08-041-0/+5
|
* Added 'debug' flag to 'find_library_file()'.Greg Ward2000-08-041-3/+5
|
* Added 'execute()' method, a thin wrapper around 'util.execute() (just likeGreg Ward2000-08-021-1/+4
| | | | the one in cmd.py).
* Fixed a grab-bag of typos spotted by Rob Hooft.Greg Ward2000-07-271-1/+1
|