[Setup] Installing Python modules with Unified Installer

Kevin Teague kevin at bud.ca
Sun Dec 16 01:31:01 UTC 2007


I've been working on some "Python and Plone" notes that I hope to develop
into a more full-fledged How-To or Tutorial, since it would be quite helpful
to have all of this documented in one place. Often we just have the
assumption that people have learned these fundamentals from OS-specific docs
or Python-specific docs, but often people learn about these things "the hard
way". I know I've made just about every dumb mistake when learning these
things myself :)

For the FAQ, the examples could be made a little more explicit by showing
before/after behaviour, e.g.:

$ which python
$ export PATH=/opt/Plone-3.0.4/Python-2.4.4/bin:$PATH
$ which python

For the package example to make it explicit the fact you are working in a
source package:

$ cd ~/builds/your-python-package
$ python setup.py install

Also, if you are manipulating your environment, it's important to be aware
of this fact. People will often make changes in their shell profile, and
then forget all about them, and can run into problems when trying to install
Python packages for a different application (or different Plone install).
You would never want to do these alterations to the shell profile for the
root account for example (beyond providing aliases, since they have to
invoked explicitly).

One way to remind yourself of environment customizations is to alter the PS1
environment variable:

hostname:~ username$ echo $PS1
\h:\W \u$
hostname:~ username$ export PS1='(name-of-my-plone-install)\h:\W \u\$ '
(name-of-my-plone-install)hostname:~ username$ 

Which can be wrapped into an alias:

alias py4prod="PATH=/path/to/python/bin:$PATH; export
PS1='(prod-py-plone)\h:\W \u\$ '"

View this message in context: http://www.nabble.com/Installing-Python-modules-with-Unified-Installer-tp14354398s15482p14357231.html
Sent from the Installation, Setup, Upgrades mailing list archive at Nabble.com.

More information about the Setup mailing list