[Cython] Patch distutils to prevent overwriting of build-lib

This bug in distutils prevented building the MSI installer on Windows.
This commit is contained in:
Ray Speth 2013-06-24 15:21:25 +00:00
parent 4591159cd9
commit 58d6917fe4

View file

@ -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@