C target directory fix for build_ext
authorStefan Behnel <scoder@users.berlios.de>
Mon, 31 Dec 2007 13:24:13 +0000 (14:24 +0100)
committerStefan Behnel <scoder@users.berlios.de>
Mon, 31 Dec 2007 13:24:13 +0000 (14:24 +0100)
Cython/Distutils/build_ext.py

index 4d36e6e9a281903808932a4bbc455bb51282e05f..476967623ebfe16f9b05704675444ae1b96422d0 100644 (file)
@@ -156,7 +156,7 @@ class build_ext(_build_ext.build_ext):
             target_dir = ""
 
         for source in sources:
-            (base, ext) = os.path.splitext(source)
+            (base, ext) = os.path.splitext(os.path.basename(source))
             if ext == ".pyx":                    # Cython source file
                 new_sources.append(os.path.join(target_dir, base + target_ext))
                 pyrex_sources.append(source)