
Andy Todd wrote:
In the latest version of PythonCard we need to include a configuration file with the application code. What this means is that we would like to include a file called stc-styles.cfg in our package and when someone does an install it needs to end up in /usr/lib/python2.2/site-packages/PythonCard (or C:\Python\Lib\site-packages\PythonCard on Windows).
i've got a 'datafile installer' for pygame that'll do what you desire. #data installer with improved intelligence over distutils. #data files are copied into the project directory instead #of willy-nilly class smart_install_data(install_data): def run(self): #need to change self.install_dir to the actual library dir install_cmd = self.get_finalized_command('install') self.install_dir = getattr(install_cmd, 'install_lib') return install_data.run(self) project_name = 'pygame' setup( name = project_name packages = [project_name] cmdclass = {'install_data': smart_install_data}, data_files = [[project_name, ['stc_styles.cfg', 'blah']]] ...) ...or something to this effect. of course, please change "project_name" to something that won't clobber my files :]