Re: [matplotlib-devel] Problems with new PyQt4 API

2011-03-04 Thread Martin Teichmann
Hi Ben, Hi list,

> Exactly.  That's all I found too.  Nothing indicates that we need to
> change anything.  We are throwing away the second part of the tuple
> which has the returned filter.  The only reason I see for the new
> function is so the coder can get back the filter string, which we
> don't seem to use.

It took me a while to see the problem, too. The point is: there is one parameter
missing in the new API of getSaveFileName, called selectedFilter,
which we use, and
given that it is missing, python takes it to be the next parameter, which
must be an int, and you get a TypeError. I discussed this with
Phil Thompson (the author of PyQt4) over at the PyQt4 mailing list
(see http://www.mail-archive.com/pyqt%40riverbankcomputing.com/msg23733.html)
and he told me to use getSaveFileNameAndFilter.

The other option would be to change PyQt4, dunno which is best.

Greetings

Martin

-- 
Max-Born-Institut
Max-Born-Straße 2a
12489 Berlin
+49 30 6392 1234

--
What You Don't Know About Data Connectivity CAN Hurt You
This paper provides an overview of data connectivity, details
its effect on application quality, and explores various alternative
solutions. http://p.sf.net/sfu/progress-d2d
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


[matplotlib-devel] make.osx: should it set --prefix=$PREFIX ?

2011-03-04 Thread Jouni K . Seppänen
We have an open pull request for fixing some problems in the make.osx
file:

https://github.com/matplotlib/matplotlib/pull/17

I think it's otherwise fine, but it changes the mpl_install target by
removing the --prefix argument. Personally I would prefer to drop the
--prefix, but this is originally John's file and he may have had a good
reason to install in a non-standard directory. Any comments?

-- 
Jouni K. Seppänen
http://www.iki.fi/jks


--
What You Don't Know About Data Connectivity CAN Hurt You
This paper provides an overview of data connectivity, details
its effect on application quality, and explores various alternative
solutions. http://p.sf.net/sfu/progress-d2d
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] make.osx: should it set --prefix=$PREFIX ?

2011-03-04 Thread Eric Firing
On 03/04/2011 10:30 AM, Jouni K. Seppänen wrote:
> We have an open pull request for fixing some problems in the make.osx
> file:
>
> https://github.com/matplotlib/matplotlib/pull/17
>
> I think it's otherwise fine, but it changes the mpl_install target by
> removing the --prefix argument. Personally I would prefer to drop the
> --prefix, but this is originally John's file and he may have had a good
> reason to install in a non-standard directory. Any comments?
>

I presume a user might want to be able to build and test a development 
version without replacing a production version.

What is the rationale for removing the --prefix argument?  It doesn't 
prevent one from installing in the standard location.

Eric


--
What You Don't Know About Data Connectivity CAN Hurt You
This paper provides an overview of data connectivity, details
its effect on application quality, and explores various alternative
solutions. http://p.sf.net/sfu/progress-d2d
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] make.osx: should it set --prefix=$PREFIX ?

2011-03-04 Thread Fernando Garcia Bermudez
On Fri, Mar 4, 2011 at 13:40, Eric Firing  wrote:

> On 03/04/2011 10:30 AM, Jouni K. Seppänen wrote:
> > We have an open pull request for fixing some problems in the make.osx
> > file:
> >
> > https://github.com/matplotlib/matplotlib/pull/17
> >
> > I think it's otherwise fine, but it changes the mpl_install target by
> > removing the --prefix argument. Personally I would prefer to drop the
> > --prefix, but this is originally John's file and he may have had a good
> > reason to install in a non-standard directory. Any comments?
> >
>
> I presume a user might want to be able to build and test a development
> version without replacing a production version.
>
> What is the rationale for removing the --prefix argument?  It doesn't
> prevent one from installing in the standard location.
>
> Eric
>

My rationale for removing the --prefix argument was that a user might want
to compile matplotlib from source on MacOSX instead of install it from a
package (assuming such a package exists). As it stands now, the make.osx
file has some configuration at the top and then states that you shouldn't
need to configure past a point.

I've recently gone from relying on Enthought to compiling the packages I use
from source. All of the other packages (numpy/scipy, ipython, PIL, pyserial)
install by default on the site-packages relevant to the python version used
in the install. Removing the --prefix argument would bring the same
functionality to matplotlib on OSX. This default could be modified by
developers that would rather install in a test environment.

As I mention in the pull request, though, I'm still unsure if the
dependencies are compile-time or not. I've left the PREFIX intact after
installing into the production site-packages and I haven't had any issues so
far. The reason the PREFIX is needed, as README.osx explains, is because OSX
can have different types of zlib, png and freetype installed on the system.

If this change blocks the pull request from going through, though, I could
just revert that change and open up another one once we've cleared up any
doubts about what the rationale for having the --prefix in the first place
are.

-- Fernando
--
What You Don't Know About Data Connectivity CAN Hurt You
This paper provides an overview of data connectivity, details
its effect on application quality, and explores various alternative
solutions. http://p.sf.net/sfu/progress-d2d___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] What's the status of the py3k branch?

2011-03-04 Thread Michiel de Hoon
OK, if there are no objections I will start making the appropriate changes to 
the code and the documentation. 
-- Michiel

On Sun Feb 27th, 2011 8:49 AM EST John Hunter wrote:

>On Sun, Feb 27, 2011 at 1:06 AM, Eric Firing  wrote:
>
>> That's a good point.  Until fairly recently, interactive behavior worked
>> across backends only via ipython magic, so I think the non-interactive
>> default had a solid historical rationale.  Now, however, we could
>> probably make interactive mode the startup default for interactive
>> backends without causing any problems.  I agree that this would be more
>> intuitive and more familiar to people coming from matlab.
>
>Probably right -- this was a design decision made early on when I did
>not see a good way around the problem that the idle drawing across
>backends now solves.  There will probably be some unintended
>consequences of changing the default, but as long as we document it
>prominently and provide a way for people to change the behavior to the
>old wan in their rc, it is probably a good idea to make this change.
>
>--
>Free Software Download: Index, Search & Analyze Logs and other IT data in 
>Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
>generated by your applications, servers and devices whether physical, virtual
>or in the cloud. Deliver compliance at lower cost and gain new business 
>insights. http://p.sf.net/sfu/splunk-dev2dev 
>___
>Matplotlib-devel mailing list
>Matplotlib-devel@lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/matplotlib-devel



  

--
What You Don't Know About Data Connectivity CAN Hurt You
This paper provides an overview of data connectivity, details
its effect on application quality, and explores various alternative
solutions. http://p.sf.net/sfu/progress-d2d
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] make.osx: should it set --prefix=$PREFIX ?

2011-03-04 Thread Jouni K . Seppänen
Eric Firing  writes:

> What is the rationale for removing the --prefix argument?  It doesn't 
> prevent one from installing in the standard location.

The $PREFIX variables is used by make.osx for two different purposes: 
(1) the dependencies are installed under $PREFIX and the extensions are
compiled to use them from there, in order to avoid version mismatches
with libraries in /usr, /opt, etc.; (2) the "setup.py install" command
is given --prefix $PREFIX as an argument so that matplotlib gets
installed in a non-standard location.

I like just (1), so to install matplotlib I do "make -n mpl_install"
and edit the command to remove the prefix. Or, actually, edit it to be
"setupegg.py develop". The Makefile sets a bunch of environment
variables that are needed for the compilation to succeed with the
downloaded dependencies.

How about putting the environment assignments in just one place and
creating multiple installation targets, maybe like this:


run_cmd:
export PKG_CONFIG_PATH=${PKG_CONFIG_PATH} \
(etc) \
${PYTHON} ${CMD}

mpl_build:
run_cmd CMD="setup.py build"

mpl_install:
run_cmd CMD="setup.py install --prefix=${PREFIX}"

mpl_install_std:
run_cmd CMD="setup.py install"

mpl_develop:
run_cmd CMD="setupegg.py develop"


-- 
Jouni K. Seppänen
http://www.iki.fi/jks


--
What You Don't Know About Data Connectivity CAN Hurt You
This paper provides an overview of data connectivity, details
its effect on application quality, and explores various alternative
solutions. http://p.sf.net/sfu/progress-d2d
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] make.osx: should it set --prefix=$PREFIX ?

2011-03-04 Thread Eric Firing
On 03/04/2011 09:09 PM, Jouni K. Seppänen wrote:
> Eric Firing  writes:
>
>> What is the rationale for removing the --prefix argument?  It doesn't
>> prevent one from installing in the standard location.
>
> The $PREFIX variables is used by make.osx for two different purposes:
> (1) the dependencies are installed under $PREFIX and the extensions are
> compiled to use them from there, in order to avoid version mismatches
> with libraries in /usr, /opt, etc.; (2) the "setup.py install" command
> is given --prefix $PREFIX as an argument so that matplotlib gets
> installed in a non-standard location.
>
> I like just (1), so to install matplotlib I do "make -n mpl_install"
> and edit the command to remove the prefix. Or, actually, edit it to be
> "setupegg.py develop". The Makefile sets a bunch of environment
> variables that are needed for the compilation to succeed with the
> downloaded dependencies.
>
> How about putting the environment assignments in just one place and
> creating multiple installation targets, maybe like this:
>
> 
> run_cmd:
>  export PKG_CONFIG_PATH=${PKG_CONFIG_PATH} \
>  (etc) \
>  ${PYTHON} ${CMD}
>
> mpl_build:
>  run_cmd CMD="setup.py build"
>
> mpl_install:
>  run_cmd CMD="setup.py install --prefix=${PREFIX}"
>
> mpl_install_std:
>  run_cmd CMD="setup.py install"
>
> mpl_develop:
>  run_cmd CMD="setupegg.py develop"
> 
>

That looks to me like a good solution.

Eric



--
What You Don't Know About Data Connectivity CAN Hurt You
This paper provides an overview of data connectivity, details
its effect on application quality, and explores various alternative
solutions. http://p.sf.net/sfu/progress-d2d
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel