oskusalerma/trelby — pull request #291 by ockham (2012-10-08 16:50:19+00:00)
Title: Switch to distutils-based building and installation.

see https://github.com/oskusalerma/trelby/pull/284
Fixing Windows build by renaming setup.cfg during py2exe invocation in build.bat.
Replacing single by double quotes. I guess [this comment](https://github.com/oskusalerma/trelby/pull/275#issuecomment-9125266) had confused me.

Commit log:

Motivated to comply better with the Filesystem Hierarchy Standard (FHS),
and in preparation of an 'official' Debian package, this involves:
* Make trelby code an actual Python module by adding an __init__.py
to the src/ directory so it can be installed by setup.py.
* Move execution of main() from trelby/trelby.py to a newly created
bin/trelby executable python file.
* Make src/trelby.py no longer executable, and remove shebang.
* setup.py: Add the required distutils attributes and logic to setup.py.
In particular, this means modifying bin/trelby at installation time
so that it prepends the actual modules installation path to sys.path.
* setup.cfg: Install to /opt/trelby by default.
* Add MANIFEST.in that lists files to be included
in the source tarball that can be generated by invoking
python setup.py sdist
* src/misc.py: Make the version constant globally available for
use by setup.py; look for the resources directory in ../ .
* Remove gen_linux_dist.sh, and adapt Makefile accordingly to use
different command options of setup.py instead.
* Replace /opt paths in trelby.desktop by the new appropriate values.
* Simplify build.bat. Most of it is obsolete as we have a proper setup.py now.
* Rename README.linux to INSTALL, update contents.
* Fix README.dev and t.bat accordingly.
* Remove debian/dirs (obsolete), and fix debian/rules for distutils.
* debian/install: Install trelby.desktop to /usr/share/applications.
* debian/rules: Modify so the Debian package installs to /usr/share/trelby
and /usr/bin instead of /opt/trelby.
* Fix Uninstall section of install.nsi.