summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormattip <matti.picus@gmail.com>2015-10-13 23:59:48 +0300
committermattip <matti.picus@gmail.com>2015-10-13 23:59:48 +0300
commit21d295f391a74657e4fab44694c90a0bde11c46b (patch)
tree006f898257dc285e3e2f3289ecffd20f0c4e340c
parent9f40e986b3bd13f7bca2f48e5116420994f8a93e (diff)
downloadcffi-21d295f391a74657e4fab44694c90a0bde11c46b.tar.gz
document hack removal, leave hack in place for backward compatability with verify()
-rw-r--r--cffi/verifier.py10
-rw-r--r--doc/source/installation.rst7
2 files changed, 16 insertions, 1 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:
diff --git a/doc/source/installation.rst b/doc/source/installation.rst
index 0808c4f..5d17080 100644
--- a/doc/source/installation.rst
+++ b/doc/source/installation.rst
@@ -137,6 +137,10 @@ Win32 works and is tested at least each official release.
The recommended C compiler compatible with Python 2.7 is this one:
http://www.microsoft.com/en-us/download/details.aspx?id=44266
+There is a known problem with distutils on Python 2.7.9, as
+explained in https://bugs.python.org/issue23246, and the same
+problem applies whenever you want to run compile() to build a dll.
+``import setuptools`` might help, but YMMV
For Python 3.4 and beyond:
https://www.visualstudio.com/en-us/downloads/visual-studio-2015-ctp-vs
@@ -146,7 +150,8 @@ Windows 64
++++++++++
Win64 received very basic testing and we applied a few essential
-fixes in cffi 0.7. Please report any other issue.
+fixes in cffi 0.7. The comment above applies for Python 2.7 on
+Windows 64 as well. Please report any other issue.
Note as usual that this is only about running the 64-bit version of
Python on the 64-bit OS. If you're running the 32-bit version (the