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:
To get started creating an egg, you will need to create a new folder and put the mymath folder inside it. Then create a setup.py file in the parent directory to mymath with the following contents: Python has its own package for creating distributions that is called distutils.
Uninstalling an egg is a bit tougher. You will have to go to its install location and delete the folder and / or egg file it installed as well as remove the entry for the package from the easy-install.pth file. All of these items can be found in your Python’s site-packages folder.
If you want to, you also use easy_install to upload your egg or source directly to the Python Package Index (PyPI) by using the following commands (copied from docs): setup.py bdist_egg upload # create an egg and upload it. setup.py sdist upload # create a source distro and upload it.
Where do I find Python Eggs? You can find Python Eggs on quite a few places on the web, e.g. at a package author’s website. The biggest repository of eggs is the Cheeseshop (or PyPI) though), an index for Python packages.
I think I did it by:
$ sudo easy_install /usr/local/lib/python2.7/dist-packages/cssutils-1.0-py2.7.egg
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With