question re: easy_install and macports

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

question re: easy_install and macports

Chris Jerdonek-3
Hi, I have a quick question regarding easy_install and MacPorts.  I
tried easy_installing nose while using MacPorts (Python 2.6.7 /
py26-distribute @0.6.24_0 / MacPorts version 2.0.3) --

> sudo python -m easy_install nose

This worked, except it installed the nosetests script into--

/opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin

but did not create an alias in--

/opt/local/bin

So nosetests is not automatically in the path.  Was this a problem
with MacPorts, easy_install, or nose?  Whose responsibility was it to
create the alias?

Thanks a lot,
--Chris
_______________________________________________
Distutils-SIG maillist  -  [hidden email]
http://mail.python.org/mailman/listinfo/distutils-sig
Reply | Threaded
Open this post in threaded view
|

Re: question re: easy_install and macports

PJ Eby
On Thu, Oct 27, 2011 at 8:22 AM, Chris Jerdonek <[hidden email]> wrote:
Hi, I have a quick question regarding easy_install and MacPorts.  I
tried easy_installing nose while using MacPorts (Python 2.6.7 /
py26-distribute @0.6.24_0 / MacPorts version 2.0.3) --

> sudo python -m easy_install nose

This worked, except it installed the nosetests script into--

/opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin

but did not create an alias in--

/opt/local/bin

So nosetests is not automatically in the path.  Was this a problem
with MacPorts, easy_install, or nose?  Whose responsibility was it to
create the alias?

easy_install doesn't create aliases or symlinks for such things; it just installs where it's told to by the local distutils configuration.  You can use the command line or standard distutils configuration to tell it where you want scripts installed.


_______________________________________________
Distutils-SIG maillist  -  [hidden email]
http://mail.python.org/mailman/listinfo/distutils-sig
Reply | Threaded
Open this post in threaded view
|

Re: question re: easy_install and macports

Ned Deily
In reply to this post by Chris Jerdonek-3
In article
<[hidden email]>,
 Chris Jerdonek <[hidden email]> wrote:

> Hi, I have a quick question regarding easy_install and MacPorts.  I
> tried easy_installing nose while using MacPorts (Python 2.6.7 /
> py26-distribute @0.6.24_0 / MacPorts version 2.0.3) --
>
> > sudo python -m easy_install nose
>
> This worked, except it installed the nosetests script into--
>
> /opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin
>
> but did not create an alias in--
>
> /opt/local/bin
>
> So nosetests is not automatically in the path.  Was this a problem
> with MacPorts, easy_install, or nose?  Whose responsibility was it to
> create the alias?

For Mac OS X Python framework builds, the easiest general solution is to
add the framework bin directory to your shell PATH.  The python.org
installers do that by default.  For a Macports Python, you can add
something like:

export
PATH=/opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin:$PAT
H

to the appropriate shell initialization profile, like .bash_profile.

--
 Ned Deily,
 [hidden email]

_______________________________________________
Distutils-SIG maillist  -  [hidden email]
http://mail.python.org/mailman/listinfo/distutils-sig
Reply | Threaded
Open this post in threaded view
|

Re: question re: easy_install and macports

Chris Jerdonek-3
On Thu, Oct 27, 2011 at 1:23 PM, Ned Deily <[hidden email]> wrote:
> In article
> <[hidden email]>,
>  Chris Jerdonek <[hidden email]> wrote:
>> Hi, I have a quick question regarding easy_install and MacPorts.  I
>> tried easy_installing nose

>> This worked, except it installed the nosetests script into--
>>
>> /opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin
>>
>> but did not create an alias in--
>>
>> /opt/local/bin
>>
> For Mac OS X Python framework builds, the easiest general solution is to
> add the framework bin directory to your shell PATH.  The python.org
> installers do that by default.  For a Macports Python, you can add
> something like:
>
> export
> PATH=/opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin:$PAT
> H

Thanks for the reply, Ned.  Will this approach cause problems, though,
when switching to a different Python using "port select python" --
what's the best way to handle that issue?  Also, is there any reason
why "port select python" wasn't written to swap out and add the
appropriate framework bin to your PATH, say, immediately after
/opt/local/bin?

Thanks again,
--Chris
_______________________________________________
Distutils-SIG maillist  -  [hidden email]
http://mail.python.org/mailman/listinfo/distutils-sig
Reply | Threaded
Open this post in threaded view
|

Re: question re: easy_install and macports

Ned Deily
In article
<[hidden email]>,
 Chris Jerdonek <[hidden email]> wrote:

> On Thu, Oct 27, 2011 at 1:23 PM, Ned Deily <[hidden email]> wrote:
> > In article
> > <[hidden email]>,
> >  Chris Jerdonek <[hidden email]> wrote:
> >> Hi, I have a quick question regarding easy_install and MacPorts.  I
> >> tried easy_installing nose
>
> >> This worked, except it installed the nosetests script into--
> >>
> >> /opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin
> >>
> >> but did not create an alias in--
> >>
> >> /opt/local/bin
> >>
> > For Mac OS X Python framework builds, the easiest general solution is to
> > add the framework bin directory to your shell PATH.  The python.org
> > installers do that by default.  For a Macports Python, you can add
> > something like:
> >
> > export
> > PATH=/opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin:$PAT
> > H
>
> Thanks for the reply, Ned.  Will this approach cause problems, though,
> when switching to a different Python using "port select python" --
> what's the best way to handle that issue?  Also, is there any reason
> why "port select python" wasn't written to swap out and add the
> appropriate framework bin to your PATH, say, immediately after
> /opt/local/bin?

Dunno.  You could file an issue with the MacPorts project.  It seems
like they've added explicit links to /opt/local/bin for most of the
ports that include Python scripts.  But that doesn't help if you are
using easy_install or pip to install other Python packages.  For
supporting switching between MacPorts Python versions, you can
substitute "Current" for "2.6" in the above path; I believe "port select
python" updates the "Current" link to point to the selected version.

--
 Ned Deily,
 [hidden email]

_______________________________________________
Distutils-SIG maillist  -  [hidden email]
http://mail.python.org/mailman/listinfo/distutils-sig
Reply | Threaded
Open this post in threaded view
|

Re: question re: easy_install and macports

Chris Jerdonek-3
On Thu, Oct 27, 2011 at 11:54 PM, Ned Deily <[hidden email]> wrote:

>> >> Hi, I have a quick question regarding easy_install and MacPorts.  I
>> >> tried easy_installing nose
>>
>> >> This worked, except it installed the nosetests script into--
>> >>
>> >> /opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin
>> >>
>> >> but did not create an alias in--
>> >>
>> >> /opt/local/bin
>> >>
>> > For Mac OS X Python framework builds, the easiest general solution is to
>> > add the framework bin directory to your shell PATH.  The python.org
>> > installers do that by default.
> For supporting switching between MacPorts Python versions, you can
> substitute "Current" for "2.6" in the above path; I believe "port select
> python" updates the "Current" link to point to the selected version.

Thanks.  Adding MacPorts "Current" framework bin to my path is the
solution I was looking for.

--Chris
_______________________________________________
Distutils-SIG maillist  -  [hidden email]
http://mail.python.org/mailman/listinfo/distutils-sig