Differences between revisions 1 and 29 (spanning 28 versions)
Revision 1 as of 2004-05-19 18:09:52
Size: 1342
Editor: 206
Comment:
Revision 29 as of 2018-10-10 16:15:18
Size: 287
Editor: FlorianHes
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
= Introduction =
= Changes required to matplotlib =
I had to patch matplotlib's __init__.py file in the get_data_path() routine. Specifically, right before raising the error at the end, I added the following code
{{{
#!python
      # CODE ADDED TO SUPPORT PY2EXE
      if sys.frozen:
         path = os.path.join(os.path.split(sys.path[0])[0], 'matplotlib')
         return path
}}}
= Special content for setup.py to use matplotlib =
We also need to make sure we get the matplotlib subdirectory created in the distribution. This is where we'll include all of the stuff matplotlib includes in the pythonXX\share\matplotlib directory. This is also where the __init__ file has been updated to look for this information.
{{{
#!python
# We need to import the glob module to search for all files.
import glob

# We need to exclude matplotlib backends not being used by this executable.
# You may find that you need different excludes to create a working executable with your chosen backend
opts = {
    'py2exe': { 'excludes': ['_gtkagg', '_tkagg'],
                'dll_excludes': ['libgdk-win32-2.0-0.dll',
                                 'libgobject-2.0-0.dll']}

setup(
    # Additional data files required by matplotlib. Note that the glob.glob routine doesn't seem to pick up the .matplotlib resource file
}}}
Got nothing to say about me I think.<<<BR>>
><<<BR>>
>
Lovely to be a member of this community.<<<BR>>
><<<BR>>
>
I just hope I am useful at all<<<BR>>
><<<BR>>
>
<<<BR>>
><<<BR>>
>
Also visit my web-site: [[https://jacksonvillelocksmithnow.com|Jacksonville Locksmith Now]]

Got nothing to say about me I think.<
><
> Lovely to be a member of this community.<
><
> I just hope I am useful at all<
><
> <
><
> Also visit my web-site: Jacksonville Locksmith Now

MatPlotLib (last edited 2018-10-31 15:57:34 by JimmyRetzlaff)