diff options
author | Seth Troisi <sethtroisi@google.com> | 2020-01-09 18:19:40 -0800 |
---|---|---|
committer | Seth Troisi <sethtroisi@google.com> | 2020-01-12 21:11:46 -0800 |
commit | addf86ba5ec6d0038993f00d782101f365ddeb6d (patch) | |
tree | ce567a2e63a080616b9995c0c19633778e25557e /numpy/distutils/extension.py | |
parent | b757fb34555d4c13e159ea4698608a2fc9624b92 (diff) | |
download | numpy-addf86ba5ec6d0038993f00d782101f365ddeb6d.tar.gz |
MAINT: cleanup sys.version dependant code
Diffstat (limited to 'numpy/distutils/extension.py')
-rw-r--r-- | numpy/distutils/extension.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/numpy/distutils/extension.py b/numpy/distutils/extension.py index 3b5c3db35..704f1e7aa 100644 --- a/numpy/distutils/extension.py +++ b/numpy/distutils/extension.py @@ -10,9 +10,6 @@ import sys import re from distutils.extension import Extension as old_Extension -if sys.version_info[0] >= 3: - basestring = str - cxx_ext_re = re.compile(r'.*[.](cpp|cxx|cc)\Z', re.I).match fortran_pyf_ext_re = re.compile(r'.*[.](f90|f95|f77|for|ftn|f|pyf)\Z', re.I).match @@ -74,7 +71,7 @@ class Extension(old_Extension): self.swig_opts = swig_opts or [] # swig_opts is assumed to be a list. Here we handle the case where it # is specified as a string instead. - if isinstance(self.swig_opts, basestring): + if isinstance(self.swig_opts, str): import warnings msg = "swig_opts is specified as a string instead of a list" warnings.warn(msg, SyntaxWarning, stacklevel=2) |