make.osx: should it set --prefix=$PREFIX ?

Eric Firing <efiring@...229...> 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

That looks to me like a good solution.

Eric

···

On 03/04/2011 09:09 PM, Jouni K. Seppänen wrote:

Eric Firing<efiring@...229...> 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"
------------------------------------------------------------------------

Fine by me as well. Maybe modify the documentation to point to mpl_install_std. How should we proceed?

– Fernando

···

On Fri, Mar 4, 2011 at 23:55, Eric Firing <efiring@…876…> wrote:

On 03/04/2011 09:09 PM, Jouni K. Seppänen wrote:

Eric Firing<efiring@…229…> 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