Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2e51d0a

Browse files
committed
Patch for get_py2exe_datafiles() to work with new directory layout. (Thanks Tocer and also Werner Bruhin.)
svn path=/trunk/matplotlib/; revision=3418
1 parent2dc560e commit2e51d0a

File tree

2 files changed

+16
-7
lines changed

2 files changed

+16
-7
lines changed

‎CHANGELOG

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
2007-06-27 Patch for get_py2exe_datafiles() to work with new directory
2+
layout. (Thanks Tocer and also Werner Bruhin.) -ADS
3+
14
2007-06-27 Added a scroll event to the mpl event handling system and
25
implemented it for backends GTK* -- other backend
36
users/developers/maintainers, please add support for your

‎lib/matplotlib/__init__.py

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -369,13 +369,19 @@ def _get_data_path():
369369
get_data_path=verbose.wrap('matplotlib data path %s',_get_data_path,always=False)
370370

371371
defget_py2exe_datafiles():
372-
importglob
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+
forroot,dirs,filesinos.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'infiles:
379+
files.remove('Matplotlib.nib')
380+
files= [os.path.join(root,filename)forfilenameinfiles]
381+
root=root.replace(tail,'matplotlibdata')
382+
root=root[root.index('matplotlibdata'):]
383+
d[root]=files
384+
returnd.items()
379385

380386
defcheckdep_dvipng():
381387
try:

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp