aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--setuptools/tests/test_build_ext.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/setuptools/tests/test_build_ext.py b/setuptools/tests/test_build_ext.py
index f2e1f59d..0edc92ec 100644
--- a/setuptools/tests/test_build_ext.py
+++ b/setuptools/tests/test_build_ext.py
@@ -1,7 +1,9 @@
import sys
import distutils.command.build_ext as orig
-
from distutils.sysconfig import get_config_var
+
+from setuptools.extern import six
+
from setuptools.command.build_ext import build_ext, get_abi3_suffix
from setuptools.dist import Distribution
from setuptools.extension import Extension
@@ -27,7 +29,7 @@ class TestBuildExt:
of Python 3 if 'is_abi3' is truthy on Extension()
"""
print(get_abi3_suffix())
-
+
extension = Extension('spam.eggs', ['eggs.c'], py_limited_api=True)
dist = Distribution(dict(ext_modules=[extension]))
cmd = build_ext(dist)
@@ -35,9 +37,9 @@ class TestBuildExt:
assert 'spam.eggs' in cmd.ext_map
res = cmd.get_ext_filename('spam.eggs')
- if sys.version_info[0] == 2 or not get_abi3_suffix():
+ if six.PY2 or not get_abi3_suffix():
assert res.endswith(get_config_var('SO'))
elif sys.platform == 'win32':
assert res.endswith('eggs.pyd')
else:
- assert 'abi3' in res \ No newline at end of file
+ assert 'abi3' in res