Installing Python Packages

2011-08-26 Thread doug
I am teaching myself python and have 2.6 installed. What is the proper way to 
install py26-setuptools? As 2.7 is the default it appears that I can neither use 
pkg_add nor build from the ports tree.


I can download the source and the 2.6 egg. It appears that I need to configure 
the egg for FreeBSD. Is that correct?

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Installing Python Packages

2011-08-26 Thread Greg Larkin
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 8/26/11 8:07 PM, doug wrote:
 I am teaching myself python and have 2.6 installed. What is the proper
 way to install py26-setuptools? As 2.7 is the default it appears that I
 can neither use pkg_add nor build from the ports tree.
 
 I can download the source and the 2.6 egg. It appears that I need to
 configure the egg for FreeBSD. Is that correct?


Hi Doug,

You can do this easily by using the ports tree.  First, add the
following to your /etc/make.conf (create the file if necessary):

PYTHON_DEFAULT_VERSION=python2.6

Next, do this:

cd /usr/ports/devel/py-setuptools  make install clean

You should be all set, and any other Python port that you install will
use the Python 2.6 installation, assuming you installed it from the
ports tree.

Hope that helps,
Greg
- -- 
Greg Larkin

http://www.FreeBSD.org/   - The Power To Serve
http://www.sourcehosting.net/ - Ready. Set. Code.
http://twitter.com/cpucycle/  - Follow you, follow me
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk5YOOIACgkQ0sRouByUApBG4ACgmgHUk1RhOzADvpgt8FaTOSSf
OioAn0k/PSJ6KlUrhy/rXFSJAiniHEeY
=29ZS
-END PGP SIGNATURE-
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Installing Python Packages

2011-08-26 Thread doug

On Fri, 26 Aug 2011, Greg Larkin wrote:


On 8/26/11 8:07 PM, doug wrote:

I am teaching myself python and have 2.6 installed. What is the proper
way to install py26-setuptools? As 2.7 is the default it appears that I
can neither use pkg_add nor build from the ports tree.

I can download the source and the 2.6 egg. It appears that I need to
configure the egg for FreeBSD. Is that correct?



Hi Doug,

You can do this easily by using the ports tree.  First, add the
following to your /etc/make.conf (create the file if necessary):

PYTHON_DEFAULT_VERSION=python2.6

Next, do this:

cd /usr/ports/devel/py-setuptools  make install clean

You should be all set, and any other Python port that you install will
use the Python 2.6 installation, assuming you installed it from the
ports tree.

Hope that helps,
Greg


Great - I am sure it will, thank you.

Where does one find all these 'magic' make variables?

_
Douglas Denault
http://www.safeport.com
d...@safeport.com
Voice: 301-217-9220
  Fax: 301-217-9277
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: Installing Python Packages

2011-08-26 Thread Greg Larkin
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 8/26/11 8:24 PM, d...@safeport.com wrote:
 On Fri, 26 Aug 2011, Greg Larkin wrote:
 
 On 8/26/11 8:07 PM, doug wrote:
 I am teaching myself python and have 2.6 installed. What is the proper
 way to install py26-setuptools? As 2.7 is the default it appears that I
 can neither use pkg_add nor build from the ports tree.

 I can download the source and the 2.6 egg. It appears that I need to
 configure the egg for FreeBSD. Is that correct?


 Hi Doug,

 You can do this easily by using the ports tree.  First, add the
 following to your /etc/make.conf (create the file if necessary):

 PYTHON_DEFAULT_VERSION=python2.6

 Next, do this:

 cd /usr/ports/devel/py-setuptools  make install clean

 You should be all set, and any other Python port that you install will
 use the Python 2.6 installation, assuming you installed it from the
 ports tree.

 Hope that helps,
 Greg
 
 Great - I am sure it will, thank you.
 
 Where does one find all these 'magic' make variables?

Hi Doug,

The best place to start is by looking through the files
/usr/ports/Mk/*.mk.  In the header comment of each .mk file, you'll find
a long list of variables and what they are used for.

Some of the variables are only useful in the context of a port Makefile,
but other ones like PYTHON_DEFAULT_VERSION are used in /etc/make.conf.
At the moment, I don't know if there's an easy way to enumerate all
variables of the latter type, but that would be a good project.

I use things like:

NOPORTDOCS=yes
NOPORTEXAMPLES=yes
NO_X11=yes

in /etc/make.conf when building server images.

Regards,
Greg
- -- 
Greg Larkin

http://www.FreeBSD.org/   - The Power To Serve
http://www.sourcehosting.net/ - Ready. Set. Code.
http://twitter.com/cpucycle/  - Follow you, follow me
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEUEARECAAYFAk5YYboACgkQ0sRouByUApA0WACeKqc/nO43eTesrdF1WiiKh0qA
+oUAmM+tzYNhbXSJ+VtKdRM8CWmL/Is=
=e/fR
-END PGP SIGNATURE-
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org