summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/command/build_clib.py
diff options
context:
space:
mode:
authorTarek Ziadé <ziade.tarek@gmail.com>2009-05-06 08:05:47 (GMT)
committerTarek Ziadé <ziade.tarek@gmail.com>2009-05-06 08:05:47 (GMT)
commitccf608c94c17aeb06c5974489eb33767816f3107 (patch)
tree8da742690058854fef6d1ba7de21c53acd013839 /Lib/distutils/command/build_clib.py
parentb04a05709d381a2630b4693664beac6eee7adee3 (diff)
downloadcpython-ccf608c94c17aeb06c5974489eb33767816f3107.zip
cpython-ccf608c94c17aeb06c5974489eb33767816f3107.tar.gz
cpython-ccf608c94c17aeb06c5974489eb33767816f3107.tar.bz2
more build_clib cleanup + test coverage
Diffstat (limited to 'Lib/distutils/command/build_clib.py')
-rw-r--r--Lib/distutils/command/build_clib.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/Lib/distutils/command/build_clib.py b/Lib/distutils/command/build_clib.py
index 18415cf..447ea94 100644
--- a/Lib/distutils/command/build_clib.py
+++ b/Lib/distutils/command/build_clib.py
@@ -86,7 +86,7 @@ class build_clib (Command):
if self.include_dirs is None:
self.include_dirs = self.distribution.include_dirs or []
- if type(self.include_dirs) is StringType:
+ if isinstance(self.include_dirs, str):
self.include_dirs = string.split(self.include_dirs,
os.pathsep)
@@ -170,8 +170,7 @@ class build_clib (Command):
filenames = []
for (lib_name, build_info) in self.libraries:
sources = build_info.get('sources')
- if (sources is None or
- type(sources) not in (ListType, TupleType) ):
+ if sources is None or not isinstance(sources, (list, tuple)):
raise DistutilsSetupError, \
("in 'libraries' option (library '%s'), "
"'sources' must be present and must be "
@@ -183,7 +182,7 @@ class build_clib (Command):
def build_libraries (self, libraries):
for (lib_name, build_info) in libraries:
sources = build_info.get('sources')
- if sources is None or type(sources) not in (ListType, TupleType):
+ if sources is None or not isinstance(sources, (list, tuple)):
raise DistutilsSetupError, \
("in 'libraries' option (library '%s'), " +
"'sources' must be present and must be " +