[pypy-commit] cffi default: on pypy, the _cffi_backend module doesn't have a __file__ at all

arigo noreply at buildbot.pypy.org
Fri Jun 12 19:26:14 CEST 2015


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r2184:7cd6732be4e5
Date: 2015-06-12 19:26 +0200
http://bitbucket.org/cffi/cffi/changeset/7cd6732be4e5/

Log:	on pypy, the _cffi_backend module doesn't have a __file__ at all

diff --git a/testing/cffi0/test_zintegration.py b/testing/cffi0/test_zintegration.py
--- a/testing/cffi0/test_zintegration.py
+++ b/testing/cffi0/test_zintegration.py
@@ -35,6 +35,8 @@
         paths = []
         for module in modules:
             target = __import__(module, None, None, [])
+            if not hasattr(target, '__file__'):   # for _cffi_backend on pypy
+                continue
             src = os.path.abspath(target.__file__)
             for end in ['__init__.pyc', '__init__.pyo', '__init__.py']:
                 if src.lower().endswith(end):


More information about the pypy-commit mailing list