How to install a python egg

Peter picture Peter · Jun 5, 2015 · Viewed 11.5k times · Source

I'm trying to setup ftw.mail for my postfix installation. Since I'm new to Linux and Python I don't really have a clue whether it is right, goes in the right direction or is rubbish.

From the official documentation I found this:

  • Add ftw.mail to your buildout configuration:
    [instance]
    eggs +=
    ftw.mail
  • Install the generic setup import profile.

(source: https://github.com/4teamwork/ftw.mail/blob/master/README.rst)

My first question is: Would "/etc/postfix/" the so called "buildout configuration"?

Secondly I had struggles in how to build this "egg" I tried:

$ wget https://bootstrap.pypa.io/ez_setup.py -O - | sudo python for ez_setup

then:

$ sudo apt-get install python-setuptools

and to finish:

$ sudo easy_install ftw.mail

On the console I was told, that the egg was there:

/usr/local/lib/python2.7/dist-packages/ftw.mail-2.3.1-py2.7.egg

I found it and I've read that I had to start it with:

$ PYTHONPATH=/usr/local/lib/python2.7/dist-packages/cssutils-1.0-py2.7.egg

which basically did nothing. Now the question is: How do I install the egg?

To summarise my questions:

  1. Is "etc/postfix/" the buildout configuration directory I'm looking for?
  2. How do I install a Python egg?
  3. And what am I supposed to do with:[instance] eggs += ftw.mail?
  4. What is a "generic setup import profile"?

Answer

Peter picture Peter · Jun 5, 2015

I think I did it by:

$ sudo easy_install /usr/local/lib/python2.7/dist-packages/cssutils-1.0-py2.7.egg