2720N/Acffi leaves __pycache__ around in the *source* directory, so when we build
2720N/A64-bit after 32-bit (or vice versa), the modules already exist, but are of the
2720N/Awrong ELF class. Ideally, the entire build would happen outside the source
2720N/Adirectory, but for the time being, this patch at least makes sure distutils'
2720N/Abuild_base directory (plus an extraneous directory structure) is used for the
2720N/Aobject files and shared objects.
2720N/A
2720N/AThere's probably a better way, but it will likely involve deep distutils magic
2720N/Aand maybe some patches to cffi.
2720N/A
2720N/A--- xattr-0.7.4/setup.py Mon Mar 3 10:13:29 2014
2720N/A+++ xattr-0.7.4/setup.py Mon Apr 14 14:09:58 2014
2720N/A@@ -12,6 +12,8 @@
2720N/A setup_requires hasn't run yet.
2720N/A """
2720N/A def finalize_options(self):
2720N/A+ import cffi.verifier
2720N/A+ cffi.verifier.set_tmpdir(self.build_base)
2720N/A from xattr.lib import ffi
2720N/A self.distribution.ext_modules = [ffi.verifier.get_extension()]
2720N/A build.finalize_options(self)