summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/command/build_ext.py
Commit message (Collapse)AuthorAgeFilesLines
...
* A-ha! Read Thomas' patch a little more carefully and figured it out:Greg Ward2000-06-271-1/+2
| | | | the 'implib_dir' attribute is back (only on NT, of course).
* Thomas Heller: added --swig-cpp option and fixed silly typos in SWIG support.Greg Ward2000-06-271-9/+21
| | | | | | Also supposedly made some change to where .lib files wind up under MSVC++, but I don't understand how to code is doing what Thomas says it's doing.
* Removed some debugging code that slipped into the last checkin.Greg Ward2000-06-251-4/+3
| | | | Ensure that 'extra_args' (whether compile or link args) is never None.
* Fixed the "pre-link hook" so it actually works, mainly by renaming itGreg Ward2000-06-251-41/+33
| | | | | | to 'msvc_prelink_hack()', adding the parameters that it actually needs, and only calling it for MSVC compiler objects. Generally gave up on the idea of a general "hook" mechanism: deleted the empty 'precompile_hook()'.
* Fixed a few silly bugs in my SWIG support code. (Hey, I said it wasGreg Ward2000-06-251-3/+5
| | | | | experimental and untested.) Call 'customize_compiler()' after getting CCompiler object.
* Changed so all the help-generating functions are defined, at module-level,Greg Ward2000-06-241-3/+7
| | | | | | | in the module of the command classes that have command-specific help options. This lets us keep the principle of lazily importing the ccompiler module, and also gets away from defining non-methods at class level.
* Experimental, completely untested SWIG support.Greg Ward2000-06-241-5/+74
|
* Pulled the MSVC++-specific hackery out to a new method, 'prelink_hook()',Greg Ward2000-06-171-36/+63
| | | | | | and added (empty) 'precompile_hook()' for symmetry. One can envision a much more elaborate hook mechanism, but this looks like it'll do for now.
* Patch from Rene Liebscher: this adds "--help-foo" options to list theGreg Ward2000-06-071-0/+5
| | | | | | | | | | values that "--foo" can take for various commands: eg. what formats for "sdist" and "bdist", what compilers for "build_ext" and "build_clib". I have *not* reviewed this patch; I'm checking it in as-is because it also fixes a paper-bag-over-head bug in bdist.py, and because I won't have time to review it properly for several days: so someone else can test it for me, instead!
* Overhauled to expect 'self.extensions' (taken from 'ext_modules' in theGreg Ward2000-05-311-66/+128
| | | | | | | | | | | | | | setup script) to be a list of Extension instances, rather than a list of of (ext_name, build_info) tuples. This is mostly a simplification, but 'check_extension_list()' got a lot more complicated because of the need to convert the old-style tuples to Extension instances. Temporarily dropped support for defining/undefining macros in the 'extensions' list -- I want to change the interface, but haven't yet made the required changes in CCompiler and friends to support this nicely. Also neatened up the code that merges 'extra_compile_flags' and the CFLAGS environment variable.
* Some far-reaching naming changes:Greg Ward2000-05-271-2/+2
| | | | | | | * Command method 'find_peer()' -> 'get_finalized_command()' * Command method 'run_peer()' -> 'run_command()' Also deleted the 'get_command_option()' method from Command, and fixed the one place where it was used (in "bdist_dumb").
* Rene Liebscher: check if the extension file (.so or .pyd) isGreg Ward2000-05-261-19/+24
| | | | | up-to-date with respect to the source files; that way, we don't needlessly rebuild just because object files go away.
* Normalized all the end-of-class lines.Greg Ward2000-05-251-1/+1
|
* Harry Henry Gebel: get extra compiler flags from the CFLAGS environmentGregory P. Smith2000-05-131-0/+8
| | | | | | | variable. (Is this really needed? Can we drop it when the config file mechanism allows users to set compiler flags in setup.cfg?)
* From Lyle Johnson: renamed 'implib_dir' to 'implib_file', andGregory P. Smith2000-05-131-7/+5
| | | | correctly ensure that it's 'dirname' exists.
* Fix from Lyle Johnson: add the '--compiler' option.Gregory P. Smith2000-05-121-2/+11
| | | | | | Also added creation of 'implib_dir', a temporary directory specific to MSVC++ -- but I checked in two ways of fixing it (Lyle's and mine), because I'm not sure which is right.
* Added comment about the MSVC-specific kludge.Greg Ward2000-05-091-0/+10
|
* Added the ability to sneak extra flags onto the C compiler command lineGreg Ward2000-05-061-1/+3
| | | | via an 'extra_compile_args' option in the 'build_info' dictionary.
* Cleaned up/simplified error-handling:Greg Ward2000-04-151-6/+6
| | | | | | | | | | | | | - DistutilsOptionError is now documented as it's actually used, ie. to indicate bogus option values (usually user options, eg. from the command-line) - added DistutilsSetupError to indicate errors that definitely arise in the setup script - got rid of DistutilsValueError, and changed all usage of it to either DistutilsSetupError or ValueError as appropriate - simplified a bunch of option get/set methods in Command and Distribution classes -- just pass on AttributeError most of the time, rather than turning it into something else
* Use 'get_python_inc()' to figure out the Python include directoriesGreg Ward2000-04-141-8/+5
| | | | rather than cobbling them togethere here.
* Added '--force' option -- very clear what it means for building (ignoreGreg Ward2000-04-101-1/+5
| | | | | timestamps), so every build_* command has 'self.force', which follows the 'build' command if not set by the user.
* Patch (mostly) from Thomas Heller for building on Windows:Greg Ward2000-03-311-11/+36
| | | | | | | | | * build to "Debug" or "Release" temp directory * put linker turds (.lib and .exp files) in the build temp directory * tack on "_d" to extensions built with debugging * added 'get_ext_libname()' help in putting linker turds to temp dir Also, moved the code that simplifies None to empty list for a bunch of options to 'finalize_options()' instead of 'run()'.
* Oops: 'build_extensions()' no longer takes an 'extensions' list.Greg Ward2000-03-301-1/+1
|
* Put the Python "system" include dir last, rather than first.Greg Ward2000-03-291-1/+3
|
* Added 'get_outputs()' in prepartion for the 'bdist' command.Greg Ward2000-03-291-8/+29
| | | | | | | Changed signature of 'build_extensions()': no longer takes the extension list, but uses 'self.extensions' (just like 'get_outputs()' has to) Moved call to 'check_extensions_list()' from 'run()' to 'build_extensions()', again for consistency with 'get_outputs()'.
* Fixed a bunch of screwed-up logic and inconsistent terminology.Greg Ward2000-03-261-19/+33
| | | | | Fixed 'build_extensions()' to pay attention to the 'rpath' element of the 'build_info' dictionary.
* Took out what looks like old debugging code that probably should neverGreg Ward2000-03-221-2/+1
| | | | | have been checked in: was passing the PLAT environment variable as the 'plat' argument to 'new_compiler()'.
* In 'finalize_options()': if 'self.libs' is a string, make it a singleton list.Greg Ward2000-03-181-0/+3
|
* Don't pass 'keep_dir' to 'compile()' method of CCompiler -- no longer used.Greg Ward2000-03-061-3/+4
| | | | | Don't assume that the 'libraries' and 'library_dirs' elements of the build info dict are always lists.
* Renamed 'build_lib' command to 'build_clib':Greg Ward2000-03-021-3/+3
| | | | | | * replaced build_lib.py with build_clib.py * renamed the class in build_clib.py * changed all references to 'build_lib' command in other command classes
* Changed '__rcsid__' to '__revision__'.Greg Ward2000-03-021-1/+1
|
* If the "build_lib" command built any C libraries, link with them allGreg Ward2000-03-021-3/+12
| | | | | | | when building extensions (uses build_lib's 'get_library_names()' method). Ensure that the relative structure of source filenames is preserved in the temporary build tree, eg. foo/bar.c compiles to build/temp.<plat>/foo/bar.o.
* Build reorg:Greg Ward2000-03-011-16/+41
| | | | | | | | | | | | | | * 'build_dir' -> 'build_lib', which by default takes its value straight from 'build_lib' in the 'build' command * added 'build_temp' and 'inplace' options * change 'build_extensions()' to put object files (compiler turds) in 'build_temp' dir * complicated the name-of-extension-file shenanigans in 'build_extensions()' to support "in-place" extension building, i.e. put the extension right into the source tree (handy for developers) * added 'get_ext_fullname()', renamed 'extension_filename()' to 'get_ext_filename()', and tweaked the latter a bit -- all to support the new filename shenanigans
* Renamed 'set_default_options()' to 'initialize_options()', andGreg Ward2000-02-181-5/+5
| | | | 'set_final_options()' to 'finalize_options()'.
* Renamed all 'options' class attributes to 'user_options'.Greg Ward2000-02-181-19/+20
|
* Renamed all command classes so they're exactly the same as the name of theGreg Ward2000-02-181-1/+1
| | | | | command itself: no more of this "FooBar class for foo_bar command" silliness.
* Path from Thomas Heller: resurrect the .def file kludge while preserving theGreg Ward2000-02-101-2/+14
| | | | /export option mini-kludge.
* Added 'debug' option, and changed compile/link calls to use it.Greg Ward2000-02-091-4/+12
|
* Ditch .def file kludge for (much smaller) /export option kludge.Greg Ward2000-02-081-12/+1
|
* Tweaked various comments, docstrings, and error messages.Greg Ward2000-02-051-2/+12
|
* Improved an error message.Greg Ward2000-02-031-2/+5
| | | | Announce when we start building each extension (better feedback).
* Added 'description' class attribute to every command class (to help theGreg Ward2000-01-301-5/+10
| | | | | | | '--help-commands' option). Shuffled imports around in a few command modules to avoid expensive up-front import of sysconfig (and resulting delays in generating list of all commands).
* Changed 'build_extensions()' so 'sources' can be a list or tuple; andGreg Ward1999-12-121-3/+4
| | | | | call CCompiler method 'compile()' with 'include_dirs' not 'includes'. Fixed stupid typo in 'get_source_files()'.
* Pass 'force' flag to 'new_compiler()'.Greg Ward1999-10-031-2/+3
|
* Added 'package' option.Greg Ward1999-09-291-7/+44
| | | | | | | | | | | | Catch up with renamed 'platdir' -> 'build_platlib' option in 'build'. Don't call 'set_final_options()' in 'run()' anymore -- that's now guaranteed to be taken care of for us by the Distribution instance. If 'include_dirs' is a string, split it on os.pathsep (this is half- hearted -- support for setting compile/link options on the command line is totally lame and probably won't work at all). Added 'get_source_files()' for use by 'dist' command. Added code to 'build_extensions()' to figure out the "def file" to use with MSVC++ and add it to the linker command line as an "extra_postarg".
* Some option changes:Greg Ward1999-09-211-17/+30
| | | | | | | | | | - rename 'dir' to 'build_dir' - take 'package' from distribution option 'ext_package' - take 'extensions' from distribution option 'ext_modules' - take 'include_dirs' from distribution Name keyword args explictly when calling CCompiler methods. Overhauled how we generate extension filenames (in 'extension_filename() and 'build_extension()') to take 'package' option into account.
* Added support for 'package' option, including where to link theGreg Ward1999-09-131-8/+11
| | | | actual extension module to.
* Changed to reflect the new "command options" regime -- in particular,Greg Ward1999-09-081-7/+15
| | | | | we no longer explicitly pull distribution options out of our Distribution object, but rather let the Distribution put them into the command object.
* Patch from Perry Stoll: pass 'build_info' to link method.Greg Ward1999-08-291-2/+1
|
* Implements the 'build_ext' command for building C/C++ extension modules.Greg Ward1999-08-141-0/+192