[matplotlib-devel] Statically linking matplotlib-py3k on Windows

2011-11-09 Thread Arik Raffael Funke
Hello

I have been trying to use the py3k branch but I am having some problems 
I am hoping somebody could help me with; more specifically I am looking 
for a way to statically link matplotlib.

Using
- VC 2010
- python 3.2.2
- the static linking libraries / header files for matplotlib
I have managed to get the py3k branch to build and install.

Unfortunately when I do "import pylab", python complains about missing 
dlls (for each of its dependencies, zlib, freetype, ...). Is there a way 
to link the libraries statically? I would really love to avoid having to 
juggle with dlls.

Many thanks.

Regards,
Arik

PS: As a side note, while building I am getting a lot of errors of the type:
build\temp.win32-3.2\Release\src\ft2font.pyd.manifest : general error 
c1010070: Failed to load and parse the manifest. error: command 'mt.exe' 
failed with exit status 31

I managed to get rid of these by manually creating empty .manifest files 
though I am not sure what effect this might have and whether there is an 
easier way.


-- 
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: [email protected]

--
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


[matplotlib-devel] Py3 merge

2011-11-09 Thread Michael Droettboom
I just pressed the big green merge button...  :)

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
___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Py3 merge

2011-11-09 Thread Arik Raffael Funke
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...  :)
 >
 > 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: [email protected]


--
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] Py3 merge

2011-11-09 Thread Christoph Gohlke


On 11/9/2011 2:00 PM, Arik Raffael Funke wrote:
> 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 


Christoph


>
> 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...  :)
>   >
>   >  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
>
>
>

--
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] matplotlib-grayscale

2011-11-09 Thread Friedrich Romstedt
2011/10/22 Eric Firing :
> moved from matplotlib-users:
>
> http://sourceforge.net/mailarchive/forum.php?thread_name=CAN06%3DCx2zgh8YrnF2WRaJ%3D0E8i3ROLdYW4VuurtqKrx3mdkeEg%40mail.gmail.com&forum_name=matplotlib-users

OK

> On 10/22/2011 09:31 AM, Friedrich Romstedt wrote:
>>
>> 2011/10/21 Friedrich Romstedt:
>> 
>> 3)  Providing a dedicated Filter class, that can be fed to
>> set_filter() instead of set_gray().  This I like best.
>> 
>>
>> So the filter idea was Ben's idea.  I still like idea (3) for the
>> design best.  I will check if it is possible to inject the filter code
>> into the renderer framework, since all colour settings arguments
>> somewhen flow into a call into the renderer.

This is apparently a no-go.  The backends are too tightly bound to the
C extensions moduled, e.g. aggdraw.  E.g. the image drawing method of
the Agg backend is directly assigned in the fashion::

self.draw_image = self._renderer.draw_image

So no, this will not work this way.

>>  Pro: No rcParams
>> addition necessary, no modification of the peculiar colors.py
>> ColorConverter framework necessary, just leaving those things
>> untouched and hence no worries and headaches about them.

So I'll touch it again.  I will just check my refactor I did a year
ago on ColorConverter, which was pretty decent, but well, it needs
some check.  I would first commit that to my repo, than people who are
interested can test, and then we can go on testing the higher level
functionality.

I think the filters will, instead of signalling colors.colorConveter
via rcParams that some conversion mode is turned on, signal that in
the decorator function simply directly to colors.colorConverter.
There are some open ends, though.

>> No disabling
>> of higher-level caching and at the same time negligible small impact
>> if there is no filter active.  Con: I don't know yet if it works.  I
>> vaguely remember there were some problems when I checked that
>> possibility last time (with pixmaps or something like that).  I think
>> I will find out soon enough.

:-)  Apparently I found out the same thing a year ago.

The methodology will be like this: The Artists can store a stack of
filters, and also provide some easy-appetite-wetter .set_gray()
method.  When their draw method is decorated with a special decorator,
say @filtered, then the filters will be activated upon entering and
deactivated upon exit.  The activation happens via putting the filters
onto the filter stack in the ColorConverter instance.  I'm pretty sure
this will work, somehow at least. ;-)

I've run into some strange Bus error compiling the latest matplotlib,
I'll drop another email on the user list probably (since I'm acting
here as a user, I just want to run the tests).

Friedrich

--
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
___
Matplotlib-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel