[pypy-commit] cffi default: Merged in stefanor/cffi (pull request #8)
arigo
noreply at buildbot.pypy.org
Thu Feb 28 09:08:25 CET 2013
Author: arigo <armin.rigo at gmail.com>
Branch:
Changeset: r1173:ac6e8b7a5317
Date: 2013-02-28 09:08 +0100
http://bitbucket.org/cffi/cffi/changeset/ac6e8b7a5317/
Log: Merged in stefanor/cffi (pull request #8)
Strip _d from cpython 2.x debug build extension names
diff --git a/cffi/verifier.py b/cffi/verifier.py
--- a/cffi/verifier.py
+++ b/cffi/verifier.py
@@ -72,7 +72,11 @@
basename = os.path.basename(self.modulefilename)
# kill both the .so extension and the other .'s, as introduced
# by Python 3: 'basename.cpython-33m.so'
- return basename.split('.', 1)[0]
+ basename = basename.split('.', 1)[0]
+ # and the _d added in Python 2 debug builds
+ if basename.endswith('_d'):
+ basename = basename[:-2]
+ return basename
def get_extension(self):
if not self._has_source:
More information about the pypy-commit
mailing list