]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Find a source file in srcdir to allow to build outside of srcdir.
authorHye-Shik Chang <hyeshik@gmail.com>
Mon, 27 Mar 2006 08:43:11 +0000 (08:43 +0000)
committerHye-Shik Chang <hyeshik@gmail.com>
Mon, 27 Mar 2006 08:43:11 +0000 (08:43 +0000)
setup.py

index bbda7f2474a22ca186ea3fba21b4099cbf05516b..126a49e98b1f0840f7ac2354fba122c1040ebb70 100644 (file)
--- 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,