From 6c403597954487e8129221351f72da3735c52c09 Mon Sep 17 00:00:00 2001 From: Hye-Shik Chang Date: Mon, 27 Mar 2006 08:43:11 +0000 Subject: [PATCH] Find a source file in srcdir to allow to build outside of srcdir. --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index bbda7f2474a..126a49e98b1 100644 --- a/setup.py +++ b/setup.py @@ -863,7 +863,7 @@ class PyBuildExt(build_ext): # Fredrik Lundh's cElementTree module. Note that this also # uses expat (via the CAPI hook in pyexpat). - if os.path.isfile('Modules/_elementtree.c'): + if os.path.isfile(os.path.join(srcdir, 'Modules', '_elementtree.c')): define_macros.append(('USE_PYEXPAT_CAPI', None)) exts.append(Extension('_elementtree', define_macros = define_macros,