From 992e40df2e22253d2e2dbd3d57579a867515ce43 Mon Sep 17 00:00:00 2001 From: Fernando Perez Date: Wed, 27 Oct 2010 00:16:56 -0700 Subject: [PATCH] Fix bug in our specification of data_files. As best I can tell, we've been mis-specifying data_files for ages. For some reason with a plain setup.py it worked fine, but using a customized cmdclass for build_py, the error shows up. The problem was that we were returning a list of triples for data_files, and the spec clearly says they must be pairs: http://docs.python.org/distutils/setupscript.html?highlight=data_files#installing-additional-files --- setupbase.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/setupbase.py b/setupbase.py index 534494284..37571a552 100644 --- a/setupbase.py +++ b/setupbase.py @@ -175,9 +175,9 @@ def make_dir_struct(tag,base,out_base): # filenames, we must join back with the dirpath to get full valid file # paths: pfiles = [pjoin(dirpath,f) for f in filenames] - # Finally, generate the entry we need, which is a triple of (tag,output + # Finally, generate the entry we need, which is a pari of (output # path, files) for use as a data_files parameter in install_data. - out.append((tag,out_path,pfiles)) + out.append((out_path, pfiles)) return out @@ -194,7 +194,8 @@ def find_data_files(): # Simple file lists can be made by hand manpages = filter(isfile, glob(pjoin('docs','man','*.1.gz'))) - igridhelpfiles = filter(isfile, glob(pjoin('IPython','extensions','igrid_help.*'))) + igridhelpfiles = filter(isfile, + glob(pjoin('IPython','extensions','igrid_help.*'))) # For nested structures, use the utility above example_files = make_dir_struct( @@ -209,8 +210,8 @@ def find_data_files(): ) # And assemble the entire output list - data_files = [ ('data',manpagebase, manpages), - ('data',pjoin(docdirbase,'extensions'),igridhelpfiles), + data_files = [ (manpagebase, manpages), + (pjoin(docdirbase, 'extensions'), igridhelpfiles), ] + manual_files + example_files ## import pprint # dbg