We put the .py files in /opt/foo/foo-1.2/...
Except, of course, for static media served by Apache, which are sent to /var/www/html/foo/foo-1.1/media/...
Except, of course, for client-specific configuration files. They go to /var/opt/customer/foo/...
They follow Linux standards, as far as I understand them.
We try to stay away from the categories /usr/lib/ and /lib because they feel like part of the distribution. We lean toward /opt and /var because they are clearly separate from the directories of the Linux distribution.
source share