diff options
author | mattip <matti.picus@gmail.com> | 2015-10-13 23:59:48 +0300 |
---|---|---|
committer | mattip <matti.picus@gmail.com> | 2015-10-13 23:59:48 +0300 |
commit | 21d295f391a74657e4fab44694c90a0bde11c46b (patch) | |
tree | 006f898257dc285e3e2f3289ecffd20f0c4e340c /cffi/verifier.py | |
parent | 9f40e986b3bd13f7bca2f48e5116420994f8a93e (diff) | |
download | cffi-21d295f391a74657e4fab44694c90a0bde11c46b.tar.gz |
document hack removal, leave hack in place for backward compatability with verify()
Diffstat (limited to 'cffi/verifier.py')
-rw-r--r-- | cffi/verifier.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/cffi/verifier.py b/cffi/verifier.py index d38866a..b4ca8b2 100644 --- a/cffi/verifier.py +++ b/cffi/verifier.py @@ -22,6 +22,15 @@ else: s = s.encode('ascii') super(NativeIO, self).write(s) +def _hack_at_distutils(): + # Windows-only workaround for some configurations: see + # https://bugs.python.org/issue23246 (Python 2.7.9) + if sys.platform == "win32": + try: + import setuptools # for side-effects, patches distutils + except ImportError: + pass + class Verifier(object): @@ -112,6 +121,7 @@ class Verifier(object): return basename def get_extension(self): + _hack_at_distutils() # backward compatibility hack if not self._has_source: with self.ffi._lock: if not self._has_source: |