diff options
| author | Stefano Rivera <stefano@rivera.za.net> | 2015-06-14 19:08:36 -0700 |
|---|---|---|
| committer | Stefano Rivera <stefano@rivera.za.net> | 2015-06-14 19:08:36 -0700 |
| commit | d1716f8ee5dd98b1c6d83cd362115940cf3d8c0a (patch) | |
| tree | da2c27ed32563cad1b08e7b6b659fcc9763e1734 | |
| parent | 6b6ba94b31ad307229ec162c84c23f5f3fb53ea4 (diff) | |
| download | cffi-d1716f8ee5dd98b1c6d83cd362115940cf3d8c0a.tar.gz | |
Correctly locate py2.7 debug build extensions
| -rw-r--r-- | testing/cffi1/test_zdist.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/testing/cffi1/test_zdist.py b/testing/cffi1/test_zdist.py index ed36855..cc2d0a2 100644 --- a/testing/cffi1/test_zdist.py +++ b/testing/cffi1/test_zdist.py @@ -59,7 +59,12 @@ class TestDist(object): 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" % ( |
