summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/unixccompiler.py
Commit message (Collapse)AuthorAgeFilesLines
* Apply patch for issue 3090: ARCHFLAGS parsing incorrectJesse Noller2008-07-161-2/+1
|
* MacOS X: Enable 4-way universal buildsRonald Oussoren2008-06-051-1/+7
| | | | | | | | | | | | | | | | | | This patch adds a new configure argument on OSX: --with-universal-archs=[32-bit|64-bit|all] When used with the --enable-universalsdk option this controls which CPU architectures are includes in the framework. The default is 32-bit, meaning i386 and ppc. The most useful alternative is 'all', which includes all 4 CPU architectures supported by MacOS X (i386, ppc, x86_64 and ppc64). This includes limited support for the Carbon bindings in 64-bit mode as well, limited because (a) I haven't done extensive testing and (b) a large portion of the Carbon API's aren't available in 64-bit mode anyway. I've also duplicated a feature of Apple's build of python: setting the environment variable 'ARCHFLAGS' controls the '-arch' flags used for building extensions using distutils.
* Patch #2167 from calvin: Remove unused importsChristian Heimes2008-02-231-1/+0
|
* Whitespace normalization.Tim Peters2006-10-181-1/+1
|
* MacOSX: The universal build requires that users have the MacOSX10.4u SDKRonald Oussoren2006-10-081-0/+16
| | | | | | installed to build extensions. This patch makes distutils emit a warning when the compiler should use an SDK but that SDK is not installed, hopefully reducing some confusion.
* MacOSX: fix rather dumb buglet that made it impossible to create extensions onRonald Oussoren2006-06-271-1/+1
| | | | OSX 10.3 when using a binary distribution build on 10.4.
* Whitespace normalization.Tim Peters2006-05-231-1/+1
|
* Patch #1488098.Ronald Oussoren2006-05-231-2/+62
| | | | | | This patchs makes it possible to create a universal build on OSX 10.4 and use the result to build extensions on 10.3. It also makes it possible to override the '-arch' and '-isysroot' compiler arguments for specific extensions.
* Patch #973204: Use -rpath instead of -R on Irix and Tru64.Martin v. Löwis2004-08-291-0/+2
|
* Whitespace normalization, via reindent.py.Tim Peters2004-07-181-3/+3
|
* Fixed indentation error. Closes bug #746953.Jack Jansen2003-06-011-2/+2
|
* Patch #740301: Add +s when linking shared libraries on HP-UX, use -LMartin v. Löwis2003-05-311-2/+4
| | | | for the library path.
* Patch #718049: Setting exe_extension for cygwinJason Tishler2003-04-181-0/+2
| | | | | | | | | | | | | | | | | | | On cygwin, the setup.py script uses unixccompiler.py for compiling and linking C extensions. The unixccompiler.py script assumes that executables do not get special extensions, which makes sense for Unix. However, on Cygwin, executables get an .exe extension. This causes a problem during the configuration step (python setup.py config), in which some temporary executables may be generated. As unixccompiler.py does not know about the .exe extension, distutils fails to clean up after itself: it does not remove _configtest.exe but tries to remove _configtest instead. The attached patch to unixccompiler.py sets the correct exe_extension for cygwin by checking if sys.platform is 'cygwin'. With this patch, distutils cleans up after itself correctly. Michiel de Hoon University of Tokyo, Human Genome Center.
* Patch #642019: Recognize gcc-x.y as gcc.Martin v. Löwis2002-11-211-1/+1
|
* 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-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [#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().
* MacOSX linker doesn't understand -R flag at all, no matter how you feed itSkip Montanaro2002-10-091-1/+4
| | | | | the flag. Punt and return a -L flag instead (returning "" gums up the command to be forked).
* The .preprocess() method didn't work, because it didn't add the input fileAndrew M. Kuchling2002-09-091-0/+1
| | | | to the command-line arguments. Fix this by adding the source filename.
* Add implementation of _compile() and use default compile() method.Jeremy Hylton2002-06-181-18/+6
|
* Refactor compile() method implementations.Jeremy Hylton2002-06-131-28/+12
| | | | | | | | 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.
* More style changes and little cleanups.Jeremy Hylton2002-06-131-63/+33
| | | | | | | | 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.
* Some more style improvementsJeremy Hylton2002-06-131-25/+4
|
* Python style conformance: Delete spaces between name of function and arglist.Jeremy Hylton2002-06-131-41/+41
| | | | Making the world better a little bit at a time <wink>.
* Remove unused imports caught by pycheckerJeremy Hylton2002-06-041-1/+1
|
* Make setup.py less chatty by default.Jeremy Hylton2002-06-041-3/+4
| | | | | | | | | | | | | | | 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.
* on MacOSX/Darwin, use ranlib when building static libs.Just van Rossum2002-02-111-1/+4
|
* When using GCC, use the right option to add a directory to the list of dirsFred Drake2001-12-111-1/+18
| | | | | searched for a dependency for runtime linking. This closes SF bug #445902.
* Whitespace normalization.Fred Drake2001-12-061-8/+8
|
* Patch by Bill Noon: added 'dylib' as a library type along withJack Jansen2001-08-271-2/+7
| | | | | 'static' and 'shared'. This fixes extension building for dynamic Pythons on MacOSX.
* Fix a mismatched parenthesis in the last patch.Guido van Rossum2001-07-161-1/+1
|
* [Bug #441527] Fixes for preprocessor support, contributed by TarnAndrew M. Kuchling2001-07-161-4/+5
| | | | Weisner Burton
* Patch #413912 from Steve Majewski: Add .m to the list of extensionsAndrew M. Kuchling2001-04-051-1/+1
| | | | in order to support Objective-C.
* Big patch from Rene Liebscher to simplify the CCompiler API andGreg Ward2000-09-271-82/+18
| | | | | | | | | | | | | | | | | | | | 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
* Standardize whitespace in function calls.Greg Ward2000-09-261-52/+52
|
* Added 'debug' flag to 'find_library_file()'.Greg Ward2000-08-041-1/+1
|
* Fix to call 'library_filename()' instead of the non-existentGreg Ward2000-07-271-3/+5
| | | | 'shared_library_filename()'.
* Lyle Johnson: added 'build_temp' parameter to 'link_shared_{lib,object}()'Greg Ward2000-06-281-3/+8
| | | | | | | methods (but not 'link_executable()', hmmm). Currently only used by BCPPCompiler; it's a dummy parameter for UnixCCompiler and MSVCCompiler. Also added 'bcpp' to compiler table used by 'new_compiler()'.
* Got rid of direct dependence on the sysconfig module. Mainly, thisGreg Ward2000-06-251-67/+35
| | | | | | | | meant playing along with the new "dictionary of executables" scheme added to CCompiler by adding the 'executables' class attribute, and changing all the compile/link/etc. methods to use the new attributes (which encapsulate both the program to run and its standard arguments, so it was a *little* bit more than just changing some names).
* Added 'preprocess()' method to CCompiler interface, and implementedGreg Ward2000-06-211-0/+32
| | | | | | it in UnixCCompiler. Still needs to be implemented in MSVCCompiler (and whatever other compiler classes are lurking out there, waiting to be checked in).
* Import exceptions from errors.py, not ccompiler.py.Greg Ward2000-05-301-3/+3
|
* Changed to catch compile/link failures and raise CompileError, LibError,Greg Ward2000-05-301-5/+22
| | | | or LinkError (exception classes defined in ccompiler.py).
* Added support for the 'export_symbols' parameter to 'link_shared_object()'Greg Ward2000-05-201-0/+3
| | | | | | and 'link_shared_lib()'. In MSVCCompiler, this is meaningful: it adds /EXPORT: options to the linker command line. In UnixCCompiler, it is ignored.
* Don't run "ranlib" if sysconfig's RANLIB (from Python's Makefile) startsGreg Ward2000-04-141-5/+7
| | | | with ":".
* Cleaned up use of sysconfig module a bit: don't import more namesGreg Ward2000-04-141-7/+13
| | | | | | | than we actually use, and do actually use AR and SO. Run ranlib on static libraries. (Should probably have a platform-check so we don't run ranlib when it's not necessary, ie. on most modern Unices.)
* Added 'runtime_library_dirs' parameter to 'link_*()' methods, and changed toGreg Ward2000-03-261-9/+13
| | | | | | use it when linking. Call '_fix_object_args()' and/or '_fix_lib_args()' as appropriate, rather than just '_fix_link_args()'.
* Changed to pay attention to the 'runtime_library_dirs' list (= 'rpath'Greg Ward2000-03-181-2/+9
| | | | | | | | | | option in the 'build_ext' command): * in ccompiler.py: 'gen_lib_options()' now takes 'runtime_library_dirs' parameter * in unixccompiler.py and msvccompiler.py: now pass 'self.runtime_library_dirs' to 'gen_lib_options()', and define 'runtime_library_dir_option()' (although in msvccompiler.py it blows up with a DistutilsPlatformError right now!)
* Renamed 'link_static_lib() to 'create_static_lib()'.Greg Ward2000-03-101-6/+6
|
* Serious overhaul of the C compiler interface and the two classes thatGreg Ward2000-03-061-185/+52
| | | | | | | | | | | | implement it (so far): * moved filename generation methods into CCompiler base class, driven by data supplied by implementation classes * moved a bunch of common code from UnixCCompiler to convenience methods in CCompiler * overhauled MSVCCompiler's compile/link methods to look and act as much as possible like UnixCCompiler's, in order to regularize both interface and behaviour (especially by using those new convenience methods)
* Changed '__rcsid__' to '__revision__'.Greg Ward2000-03-021-1/+1
|
* In the 'compile()' method: preserve the directory portion of sourceGreg Ward2000-03-021-2/+7
| | | | | | filenames when constructing object filenames, even if output_dir given -- eg. "foo/bar.c" will compile to "foo/bar.o" without an output_dir, and to "temp/foo/bar.o" if output_dir is "temp".