Hi all ,
I have a module called gridder that includes two pickled python dictionaries as its data.


I am using Py2exe to package a wx-python GUI that uses this gridder module and its associated data. The app is called GridZilla


When I run the exe file I get an error saying 

IOError: [Errno 2] No such file or directory: 'C:\\Program Files (x86)\\Gridzill
a\\bin\\library.zip\\gridder\\data\\Chemicals_Administrator.pkl'


Here are the two setup.pys attached below. In the wx-app I tried adding the path to the pickled files but it always complains . It does not seem to understand the absolute paths I have given to my pickled data.

"error: can't copy 'C:\GridZilla\gridder\src\data\Chemicals_Administrator.pkl': doesn't exist or not a regular file"

In the setup.py for the gridder module I am able to get it to install the data files into the site-packages directory. I want to know how to include those data files into the py2exe build. Either into libraries.zip or separately.

How do I specify the absolute path of the C:\gridder\src\data\*.pkl files and get them packaged preferably along with the gridder module. into gridder\data\

Thanks for your help
Hari


########################
For Gridzilla the wxpython app
#########################

from distutils.core import setup
import py2exe
import gridder
import os

pickle_files_data_list = map(os.path.abspath,[os.path.join("C:","gridder","src","data","Chemicals_Administrator.pkl"),os.path.join("C:","gridder","src","data","Chemicals_Administrator_Reverse_dict.pkl")])
print(pickle_files_data_list)
#pickle_files_data_list = [os.path.join("src","data","Chemicals_Administrator.pkl"),os.path.join("src","data","Chemicals_Administrator_Reverse_dict.pkl")]
setup(console=['gzilla.py'], options = { "py2exe" : {"includes" : ["gridder","reportlab","gzilla"]}},data_files=pickle_files_data_list)



################################
For gridder the module. This setup.py works just fine when I install as module
################################


__author__="hari"
__date__ ="$Aug 9, 2009 5:49:02 PM$"

from distutils.core import setup
import glob,os

#examples_all_files = glob.glob(os.path.join("src/examples","*.py"))
#print examples_all_files
import os
pickle_files_data_list = [os.path.join("src","data","Chemicals_Administrator.pkl"),os.path.join("src","data","Chemicals_Administrator_Reverse_dict.pkl")]

setup (
  name = 'gridder',
  version = '0.5',
  package_dir={'gridder': 'src'},
  packages=['gridder','gridder.data','gridder.examples'],
  package_data={'gridder':['data/*.pkl','examples/*.py']},
  # This loads into weird prefix
  #data_files=[('gridder/examples',examples_all_files)],
  # Declare your packages' dependencies here, for eg:
  #install_requires=['reportlab','pyyaml'],

  # Fill in these to make your Egg ready for upload to
  # PyPI
  author = 'hari jayaram',
  author_email = 'harijay@gmail.com',
  url = 'http://www.code-itch.com/gridzilla',
  license = 'MIT licence',
  long_description= 'gridder(protein-crystallization-gridmaker) the classes behind GridZilla',
  data_files=[("data",pickle_files_data_list)],
  # could also include long_description, download_url, classifiers, etc.