File tree 2 files changed +16
-7
lines changed
2 files changed +16
-7
lines changed Original file line number Diff line number Diff line change
1
+ 2007-06-27 Patch for get_py2exe_datafiles() to work with new directory
2
+ layout. (Thanks Tocer and also Werner Bruhin.) -ADS
3
+
1
4
2007-06-27 Added a scroll event to the mpl event handling system and
2
5
implemented it for backends GTK* -- other backend
3
6
users/developers/maintainers, please add support for your
Original file line number Diff line number Diff line change @@ -369,13 +369,19 @@ def _get_data_path():
369
369
get_data_path = verbose .wrap ('matplotlib data path %s' , _get_data_path , always = False )
370
370
371
371
def get_py2exe_datafiles ():
372
- import glob
373
-
374
- mplfiles = glob .glob (os .sep .join ([get_data_path (), '*' ]))
375
- # Need to explicitly remove cocoa_agg files or py2exe complains
376
- mplfiles .remove (os .sep .join ([get_data_path (), 'Matplotlib.nib' ]))
377
-
378
- return ('matplotlibdata' , mplfiles )
372
+ datapath = get_data_path ()
373
+ head , tail = os .path .split (datapath )
374
+ d = {}
375
+ for root , dirs , files in os .walk (datapath ):
376
+ # Need to explicitly remove cocoa_agg files or py2exe complains
377
+ # NOTE I dont know why, but do as previous version
378
+ if 'Matplotlib.nib' in files :
379
+ files .remove ('Matplotlib.nib' )
380
+ files = [os .path .join (root , filename ) for filename in files ]
381
+ root = root .replace (tail , 'matplotlibdata' )
382
+ root = root [root .index ('matplotlibdata' ):]
383
+ d [root ] = files
384
+ return d .items ()
379
385
380
386
def checkdep_dvipng ():
381
387
try :
You can’t perform that action at this time.
0 commit comments