Author: Manuel Jacob <m...@manueljacob.de> Branch: py3.5 Changeset: r90719:cba0df095b3f Date: 2017-03-16 00:04 +0100 http://bitbucket.org/pypy/pypy/changeset/cba0df095b3f/
Log: Fix test_importlib.util.EXTENSIONS for lazily built _testcapi on PyPy. diff --git a/lib-python/3/test/test_importlib/util.py b/lib-python/3/test/test_importlib/util.py --- a/lib-python/3/test/test_importlib/util.py +++ b/lib-python/3/test/test_importlib/util.py @@ -30,7 +30,12 @@ def _extension_details(): global EXTENSIONS - for path in sys.path: + # we need this hack on PyPy because _testcapi is built lazily + import _testcapi + import _pypy_testcapi + lib_pypy_dir = os.path.dirname(_pypy_testcapi.__file__) + c_file = os.path.join(lib_pypy_dir, '_testcapimodule.c') + for path in [_pypy_testcapi.get_hashed_dir(c_file)]: for ext in machinery.EXTENSION_SUFFIXES: filename = EXTENSIONS.name + ext file_path = os.path.join(path, filename) _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit