From 3613aa4c0e135918669a82dde967ee39147ed3ca 2010-10-27 07:16:56 From: Fernando Perez Date: 2010-10-27 07:16:56 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 --- diff --git a/setupbase.py b/setupbase.py index 5344942..37571a5 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