Py3 merge

I just pressed the big green merge button... :slight_smile:

Master should now have all of the Python 3 portability changes. It's passing all tests, and running all examples, but I still wouldn't be surprised if some things broke in the process. Please kick the tires and report bugs. It would be helpful in the bug reports to know whether the bug is only on Python 2 or 3 or both, and whether it is a regression from matplotlib 1.1.x.

Cheers,
Mike

Hi Mike,

I managed to get matplotlib to compile and run on Python 3.2.2 on Windows though at present there are two problems:

1. The linker is missing the "/MANIFEST" argument. This means that the manifest files are not being created and somehow the module does not link the dependencies properly. (Resulting in the problem I described in my email earlier today.) Also linking breaks due to the missing manifest files.

I found that a (probably too specific) fix is to modify the function "make_extension" in setupext.py: Changing the first line of the function to:
ext = Extension(*args, extra_link_args=['/MANIFEST'], **kwargs)

I am sure however that the extra arguments must be set depending on the compiler chosen - though I do not quite follow the workflow of setup.py...

2. The file containing the visual studio static dependencies (http://matplotlib.sourceforge.net/win32_static_vs.tar.gz) still has the old tk and tcl versions. It would suffice to add tk85.lib and tcl85.lib from a Python3 installation to the package.

Also, the existence of this package is very poorly advertised. It seems to be mentionned only in the code of setupext.py. The wiki-page http://matplotlib.sourceforge.net/users/installing.html makes no mention of it in the setion "Installing from source". It suggests that it is necessary to build each of the dependencies oneself.

Apart from this, on the face of it matplotlib seems to work fine on Python 3.2.2 on Windows.

Many thanks!!!
Arik

路路路

On 09/11/2011 18:24, Michael Droettboom wrote:
> I just pressed the big green merge button... :slight_smile:
>
> Master should now have all of the Python 3 portability changes. It's
> passing all tests, and running all examples, but I still wouldn't be
> surprised if some things broke in the process. Please kick the tires
> and report bugs. It would be helpful in the bug reports to know whether
> the bug is only on Python 2 or 3 or both, and whether it is a regression
> from matplotlib 1.1.x.
>
> Cheers,
> Mike
>
> ------------------------------------------------------------------------------
> RSA(R) Conference 2012
> Save $700 by Nov 18
> Register now
> http://p.sf.net/sfu/rsa-sfdev2dev1

--
Arik FUNKE
Institut Langevin
ESPCI ParisTech, CNRS UMR 7587, UPMC, UDD, INSERM
10 rue Vauquelin, 75231 PARIS Cedex 05, FRANCE
Tel: +33 1 40 79 45 91; Fax: +33 1 40 79 45 37
E-mail: arik.funke@...1033...

Hi Mike,

I managed to get matplotlib to compile and run on Python 3.2.2 on
Windows though at present there are two problems:

1. The linker is missing the "/MANIFEST" argument. This means that the
manifest files are not being created and somehow the module does not
link the dependencies properly. (Resulting in the problem I described in
my email earlier today.) Also linking breaks due to the missing manifest
files.

This is not a matplotlib specific issue. You are using Visual Studio 2010, which is not officially supported by Python distutils.

I found that a (probably too specific) fix is to modify the function
"make_extension" in setupext.py: Changing the first line of the function to:
ext = Extension(*args, extra_link_args=['/MANIFEST'], **kwargs)

I am sure however that the extra arguments must be set depending on the
compiler chosen - though I do not quite follow the workflow of setup.py...

2. The file containing the visual studio static dependencies
(http://matplotlib.sourceforge.net/win32_static_vs.tar.gz) still has the
old tk and tcl versions. It would suffice to add tk85.lib and tcl85.lib
from a Python3 installation to the package.

I recommend against using that package. It is better to build all dependencies with the same compiler and settings that will be used to build matplotlib. Up-to-date static libraries for the MS compilers supported by Python distutils are at <http://www.lfd.uci.edu/~gohlke/pythonlibs/#matplotlib>

Christoph

路路路

On 11/9/2011 2:00 PM, Arik Raffael Funke wrote:

Also, the existence of this package is very poorly advertised. It seems
to be mentionned only in the code of setupext.py. The wiki-page
http://matplotlib.sourceforge.net/users/installing.html makes no mention
of it in the setion "Installing from source". It suggests that it is
necessary to build each of the dependencies oneself.

Apart from this, on the face of it matplotlib seems to work fine on
Python 3.2.2 on Windows.

Many thanks!!!
Arik

On 09/11/2011 18:24, Michael Droettboom wrote:
聽聽> I just pressed the big green merge button... :slight_smile:
聽聽>
聽聽> Master should now have all of the Python 3 portability changes. It's
聽聽> passing all tests, and running all examples, but I still wouldn't be
聽聽> surprised if some things broke in the process. Please kick the tires
聽聽> and report bugs. It would be helpful in the bug reports to know whether
聽聽> the bug is only on Python 2 or 3 or both, and whether it is a regression
聽聽> from matplotlib 1.1.x.
聽聽>
聽聽> Cheers,
聽聽> Mike
聽聽>
------------------------------------------------------------------------------
聽聽> RSA(R) Conference 2012
聽聽> Save $700 by Nov 18
聽聽> Register now
聽聽> http://p.sf.net/sfu/rsa-sfdev2dev1