Author: Stefano Rivera <[email protected]>
Branch: 
Changeset: r2185:78ba2e4ab0ff
Date: 2015-06-14 19:08 -0700
http://bitbucket.org/cffi/cffi/changeset/78ba2e4ab0ff/

Log:    Correctly locate py2.7 debug build extensions

diff --git a/testing/cffi1/test_zdist.py b/testing/cffi1/test_zdist.py
--- a/testing/cffi1/test_zdist.py
+++ b/testing/cffi1/test_zdist.py
@@ -59,7 +59,12 @@
             if (name.endswith('.so') or name.endswith('.pyd') or
                 name.endswith('.dylib')):
                 found_so = os.path.join(curdir, name)
-                name = name.split('.')[0] + '.SO' # foo.cpython-34m.so => 
foo.SO
+                # foo.cpython-34m.so => foo
+                name = name.split('.')[0]
+                # foo_d.so => foo (Python 2 debug builds)
+                if name.endswith('_d') and hasattr(sys, 'gettotalrefcount'):
+                    name = name.rsplit('_', 1)[0]
+                name += '.SO'
             if name.startswith('pycparser') and name.endswith('.egg'):
                 continue    # no clue why this shows up sometimes and not 
others
             assert name in content, "found unexpected file %r" % (
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to