summaryrefslogtreecommitdiff
path: root/numpy/distutils/command/build_ext.py
diff options
context:
space:
mode:
authorcookedm <cookedm@localhost>2006-02-01 22:55:38 +0000
committercookedm <cookedm@localhost>2006-02-01 22:55:38 +0000
commit9a794fa867d664aaf85a82be2c7fadf2b7d5fe21 (patch)
treed01d2fc9ca49111b7662497e1162e0120c68f12d /numpy/distutils/command/build_ext.py
parentc0f4676426b86daa235331ed14720eaf7f7d461d (diff)
downloadnumpy-9a794fa867d664aaf85a82be2c7fadf2b7d5fe21.tar.gz
Replace type(a) is (something) with appropiate is_string/is_sequence tests
Diffstat (limited to 'numpy/distutils/command/build_ext.py')
-rw-r--r--numpy/distutils/command/build_ext.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/numpy/distutils/command/build_ext.py b/numpy/distutils/command/build_ext.py
index a7703ea7c..161677c86 100644
--- a/numpy/distutils/command/build_ext.py
+++ b/numpy/distutils/command/build_ext.py
@@ -5,7 +5,6 @@ import os
import string
import sys
from glob import glob
-from types import *
from distutils.dep_util import newer_group, newer
from distutils.command.build_ext import build_ext as old_build_ext
@@ -13,7 +12,7 @@ from distutils.command.build_ext import build_ext as old_build_ext
from numpy.distutils import log
from numpy.distutils.misc_util import filter_sources, has_f_sources, \
has_cxx_sources, get_ext_source_files, all_strings, \
- get_numpy_include_dirs
+ get_numpy_include_dirs, is_sequence
from distutils.errors import DistutilsFileError
class build_ext (old_build_ext):
@@ -113,7 +112,7 @@ class build_ext (old_build_ext):
def build_extension(self, ext):
sources = ext.sources
- if sources is None or type(sources) not in (ListType, TupleType):
+ if sources is None or not is_sequence(sources):
raise DistutilsSetupError, \
("in 'ext_modules' option (extension '%s'), " +
"'sources' must be present and must be " +