summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/ccompiler.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-04-27 23:53:51 (GMT)
committerGuido van Rossum <guido@python.org>2007-04-27 23:53:51 (GMT)
commit572dbf8f1320c0b34b9c786e5c30ba4a4b61b292 (patch)
tree27763a28b40b577302161008a00539649e2a536d /Lib/distutils/ccompiler.py
parentd4617f24caa1827106f5ca5e74655adf919ea499 (diff)
downloadcpython-572dbf8f1320c0b34b9c786e5c30ba4a4b61b292.zip
cpython-572dbf8f1320c0b34b9c786e5c30ba4a4b61b292.tar.gz
cpython-572dbf8f1320c0b34b9c786e5c30ba4a4b61b292.tar.bz2
Checkpoint. Manipulated things so that string literals are always
unicode, and a few other compensating changes, e.g. str <- unicode, chr <- unichr, and repr() of a unicode string no longer starts with 'u'. Lots of unit tests are broken, but some basic things work, in particular distutils works so the extensions can be built, and test_builtin.py works.
Diffstat (limited to 'Lib/distutils/ccompiler.py')
-rw-r--r--Lib/distutils/ccompiler.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/Lib/distutils/ccompiler.py b/Lib/distutils/ccompiler.py
index 25d90c8..50905c1 100644
--- a/Lib/distutils/ccompiler.py
+++ b/Lib/distutils/ccompiler.py
@@ -168,7 +168,7 @@ class CCompiler:
# set_executables ()
def set_executable(self, key, value):
- if type(value) is StringType:
+ if isinstance(value, basestring):
setattr(self, key, split_quoted(value))
else:
setattr(self, key, value)
@@ -193,8 +193,8 @@ class CCompiler:
if not (type (defn) is TupleType and
(len (defn) == 1 or
(len (defn) == 2 and
- (type (defn[1]) is StringType or defn[1] is None))) and
- type (defn[0]) is StringType):
+ (isinstance (defn[1], basestring) or defn[1] is None))) and
+ isinstance (defn[0], basestring)):
raise TypeError, \
("invalid macro definition '%s': " % defn) + \
"must be tuple (string,), (string, string), or " + \
@@ -344,7 +344,7 @@ class CCompiler:
"""
if outdir is None:
outdir = self.output_dir
- elif type(outdir) is not StringType:
+ elif not isinstance(outdir, basestring):
raise TypeError, "'output_dir' must be a string or None"
if macros is None:
@@ -442,7 +442,7 @@ class CCompiler:
"""
if output_dir is None:
output_dir = self.output_dir
- elif type (output_dir) is not StringType:
+ elif not isinstance(output_dir, basestring):
raise TypeError, "'output_dir' must be a string or None"
if macros is None:
@@ -527,7 +527,7 @@ class CCompiler:
if output_dir is None:
output_dir = self.output_dir
- elif type (output_dir) is not StringType:
+ elif not isinstance(output_dir, basestring):
raise TypeError, "'output_dir' must be a string or None"
return (objects, output_dir)