Differences between revisions 1 and 33 (spanning 32 versions)
Revision 1 as of 2004-05-19 18:09:52
Size: 1342
Editor: 206
Comment:
Revision 33 as of 2018-10-31 04:23:49
Size: 260
Editor: JohnsonSmi
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
}}}
Hello! <<<BR>>
><<<BR>>
>
I'm Portuguese female ;=). <<<BR>>
><<<BR>>
>
I really love Gaming!<<<BR>>
><<<BR>>
>
<<<BR>>
><<<BR>>
>
Here is my blog: reliable locksmith ([[https://jacksonvillelocksmithnow.com|https://jacksonvillelocksmithnow.com]])

Hello! <
><
> I'm Portuguese female ;=). <
><
> I really love Gaming!<
><
> <
><
> Here is my blog: reliable locksmith (https://jacksonvillelocksmithnow.com)

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