From 3dc89ed2b14b6e38ac68f63a3b0a7715d18497f4 Mon Sep 17 00:00:00 2001 From: Stefan van der Walt Date: Mon, 2 Nov 2009 22:47:37 +0200 Subject: [PATCH] Fix subtle rstrip bug. --- scikits/image/opencv/setup.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scikits/image/opencv/setup.py b/scikits/image/opencv/setup.py index 06748542..54d59a63 100644 --- a/scikits/image/opencv/setup.py +++ b/scikits/image/opencv/setup.py @@ -48,7 +48,7 @@ def configuration(parent_package='', top_path=None): import Cython for pyxfile in [os.path.join(base_path, f) for f in cython_files]: # make a backup of the good c files - c_file = pyxfile.rstrip('pyx') + 'c' + c_file = pyxfile[:-4] + 'c' c_file_new = c_file + '.new' # run cython compiler @@ -71,8 +71,8 @@ def configuration(parent_package='', top_path=None): pass for pyxfile in cython_files: - c_file = pyxfile.rstrip('pyx') + 'c' - config.add_extension(pyxfile.rstrip('.pyx'), + c_file = pyxfile[:-4] + 'c' + config.add_extension(pyxfile[:-4], sources=[c_file], include_dirs=[get_numpy_include_dirs()])