From 58d6917fe4ff6f538354c57c1962dd5b63e176ad Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Mon, 24 Jun 2013 15:21:25 +0000 Subject: [PATCH] [Cython] Patch distutils to prevent overwriting of build-lib This bug in distutils prevented building the MSI installer on Windows. --- interfaces/cython/setup.py.in | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/interfaces/cython/setup.py.in b/interfaces/cython/setup.py.in index 1241a7929..6c76cde8b 100644 --- a/interfaces/cython/setup.py.in +++ b/interfaces/cython/setup.py.in @@ -2,6 +2,20 @@ import os from distutils.core import setup from Cython.Build import cythonize +from distutils.command.build import build + +def get_build_lib(self): + return self._build_lib + +def set_build_lib(self, val): + if val is None or self._build_lib is None: + self._build_lib = val + +# Monkey patch to prevent bdist_msi from incorrectly overwriting the value of +# build-lib specified on the command line. +# See http://bugs.python.org/issue1109963 +build.build_lib = property(get_build_lib, set_build_lib) + exts = cythonize("cantera/_cantera.pyx") exts[0].include_dirs += @py_include_dirs@