From: NVDA S. <sv...@nv...> - 2008-11-28 01:14:30
|
Author: bzr Date: Fri Nov 28 01:14:28 2008 New Revision: 2537 Log: setup.py: Dynamically retrieve the files generated by generate.py and add them to the data files list *after* generate.py has been run. Previously, they were retrieved as setup.py was being imported, which meant that any files that weren't yet generated were not included. Modified: trunk/ (props changed) trunk/source/setup.py Modified: trunk/source/setup.py ============================================================================== --- trunk/source/setup.py (original) +++ trunk/source/setup.py Fri Nov 28 01:14:28 2008 @@ -26,12 +26,24 @@ class py2exe(build_exe.py2exe): """Overridden py2exe command to: * Run generate.py first + * Add files generated by generate.py to the data files list * Don't copy w9xpopen, as NVDA will never run on Win9x """ def run(self): + # Run generate.py. import generate generate.main() + # Add the files just generated. + self.distribution.data_files.extend( + [ + ("comInterfaces", glob("comInterfaces/*.pyc")), + ("appModules", glob("appModules/*.pyc")), + ] + + getLocaleDataFiles() + + getRecursiveDataFiles("synthDrivers", "synthDrivers", excludes=("*.py",)) + + getRecursiveDataFiles("brailleDisplayDrivers", "brailleDisplayDrivers", excludes=("*.py",)) + ) build_exe.py2exe.run(self) def copy_w9xpopen(self, modules, dlls): @@ -93,12 +105,10 @@ data_files=[ (".",glob("*.dll")+glob("*.manifest")+["builtin.dic"]), ("documentation", ['../copying.txt', '../contributors.txt']), - ("comInterfaces", glob("comInterfaces/*.pyc")), - ("appModules", glob("appModules/*.pyc")), ("appModules", glob("appModules/*.kbd")), ("lib", glob("lib/*")), ("waves", glob("waves/*.wav")), ("images", glob("images/*.ico")), ("louis/tables",glob("louis/tables/*")) - ] + getLocaleDataFiles()+getRecursiveDataFiles('documentation','../user_docs')+getRecursiveDataFiles('synthDrivers','synthDrivers',excludes=('*.py',))+getRecursiveDataFiles('brailleDisplayDrivers','brailleDisplayDrivers',excludes=('*.py',)), + ] + getRecursiveDataFiles('documentation', '../user_docs'), ) |