@@ -41,7 +41,7 @@ def get_all_data_files():
4141 all_files_and_folders = glob .glob (path + '/*' )
4242 data_files = [f for f in all_files_and_folders if
4343 (not '.py' in f [4 :]) and (not os .path .isdir (f ))]
44- total_data_files += data_files
44+ total_data_files . append (( 'lib/' + path , data_files ))
4545 return total_data_files
4646
4747my_long_description = \
@@ -63,30 +63,37 @@ def get_all_data_files():
6363]
6464
6565
66- py2exe_kwargs = {
67- 'windows' : [
68- {
69- 'script' : 'py2exe_cruft/GarlicSim.py' ,
70- 'icon_resources' : [
71- (
72- 0 ,
73- 'garlicsim_wx/misc/icon_bundle/images/garlicsim.ico'
74- )
75- ]
76- }
77- ],
78- 'zipfile' : 'lib/library.zip' ,
79- 'data_files' : get_all_data_files (),
80- 'options' : {
81- 'py2exe' : {
82- 'dist_dir' : 'py2exe_dist' ,
83- 'packages' : packages
66+ more_kwargs = {}
67+
68+ if 'py2exe' in sys .argv :
69+
70+ py2exe_kwargs = {
71+ 'windows' : [
72+ {
73+ 'script' : 'py2exe_cruft/GarlicSim.py' ,
74+ 'icon_resources' : [
75+ (
76+ 0 ,
77+ 'garlicsim_wx/misc/icon_bundle/images/garlicsim.ico'
78+ )
79+ ]
80+ }
81+ ],
82+ 'zipfile' : 'lib/library.zip' ,
83+ 'data_files' : get_all_data_files (),
84+ 'options' : {
85+ 'py2exe' : {
86+ 'dist_dir' : 'py2exe_dist' ,
87+ 'packages' : packages ,
88+ 'skip_archive' : True ,
89+ 'packages' : 'garlicsim.bundled.simulation_packages' ,
90+ }
8491 }
8592 }
86- }
8793
88- more_kwargs = py2exe_kwargs if 'py2exe' in sys . argv else {}
94+ more_kwargs . update ( py2exe_kwargs )
8995
96+
9097setuptools .setup (
9198 name = 'garlicsim_wx' ,
9299 version = '0.4' ,
0 commit comments