I am trying to understand where and how are Python packages installed and stored on Linux and find the best location to store them. My repo is Debian Wheezy.
I would like to store all my custom Python modules in one folder.
I am confused, because
1. I can see certain packages (installed with apt-get), like
pygame in all the following places:
With some files being linked from pyshared -> to
2. Some other packages are installed to
/usr/share/pysharedand then linked to
/usr/lib/python2.6 and 2.7.
3. Finally, when I install something with easy_install it gets into
/usr/local/lib/python2.7/dist-packages/ into something .egg.
In terms of all this chaos, what do you believe is the right way to keep custom modules and what is the best file format for them? Should single file modules should just be called something.py while multiple file modules should be in a folder with a
__init__.py in them? Is that right? Is there any reason to keep single-file modules in folders as well?
And most importantly where should I keep them?
/usr/local/lib/python2.7/my-packages/, or inside dist-packages?