summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorGreg Ward <gward@python.net>1999-08-29 18:17:36 (GMT)
committerGreg Ward <gward@python.net>1999-08-29 18:17:36 (GMT)
commit26e48ea7df9681c7a138388241ae6cb000d215b0 (patch)
tree4fbb8d24c104d07296765bab0adaf4bb6e2312cc /Lib
parentdbd1276dcb04e8cef458c848b11c996049c9cecb (diff)
downloadcpython-26e48ea7df9681c7a138388241ae6cb000d215b0.zip
cpython-26e48ea7df9681c7a138388241ae6cb000d215b0.tar.gz
cpython-26e48ea7df9681c7a138388241ae6cb000d215b0.tar.bz2
Patch from Perry Stoll:
- fix some broken abstract methods - kludge: add 'build_info' parameter to link methods - add 'object_name()' and 'shared_library_name()' - support for MSVCCompiler class on NT/Win95
Diffstat (limited to 'Lib')
-rw-r--r--Lib/distutils/ccompiler.py25
1 files changed, 19 insertions, 6 deletions
diff --git a/Lib/distutils/ccompiler.py b/Lib/distutils/ccompiler.py
index d5519ca..5f27ebc 100644
--- a/Lib/distutils/ccompiler.py
+++ b/Lib/distutils/ccompiler.py
@@ -294,7 +294,8 @@ class CCompiler:
objects,
output_libname,
libraries=None,
- library_dirs=None):
+ library_dirs=None,
+ build_info=None):
"""Link a bunch of stuff together to create a shared library
file. Has the same effect as 'link_static_lib()' except
that the filename inferred from 'output_libname' will most
@@ -306,7 +307,8 @@ class CCompiler:
objects,
output_filename,
libraries=None,
- library_dirs=None):
+ library_dirs=None,
+ build_info=None):
"""Link a bunch of stuff together to create a shared object
file. Much like 'link_shared_lib()', except the output
filename is explicitly supplied as 'output_filename'."""
@@ -315,27 +317,35 @@ class CCompiler:
# -- Filename mangling methods -------------------------------------
- def object_filenames (source_filenames):
+ def object_filenames (self, source_filenames):
"""Return the list of object filenames corresponding to each
specified source filename."""
pass
- def shared_object_filename (source_filename):
+ def shared_object_filename (self, source_filename):
"""Return the shared object filename corresponding to a
specified source filename."""
pass
- def library_filename (libname):
+ def library_filename (self, libname):
"""Return the static library filename corresponding to the
specified library name."""
pass
- def shared_library_filename (libname):
+ def shared_library_filename (self, libname):
"""Return the shared library filename corresponding to the
specified library name."""
pass
+
+ def object_name (self, inname):
+ """Given a name with no extension, return the name + object extension"""
+ return inname + self._obj_ext
+
+ def shared_library_name (self, inname):
+ """Given a name with no extension, return the name + shared object extension"""
+ return inname + self._shared_lib_ext
# -- Utility methods -----------------------------------------------
@@ -357,6 +367,9 @@ def new_compiler (plat=None,
if plat == 'posix':
from unixccompiler import UnixCCompiler
return UnixCCompiler (verbose, dry_run)
+ elif plat in ['nt', 'win95' ]:
+ from msvccompiler import MSVCCompiler
+ return MSVCCompiler ( verbose, dry_run )
else:
raise DistutilsPlatformError, \
"don't know how to compile C/C++ code on platform %s" % plat