oskusalerma/trelby — pull request #275 by ockham (2012-09-29 08:31:27+00:00)
Title: Switch to distutils-based building and installation.

see https://github.com/oskusalerma/trelby/pull/264
@anilgulecha: I think the issue you reported there should be fixed.

In contrast to the older pull request, I've replaced debian/patches/* with a modification of debian/rules, which I think is cleaner. Commit log below:

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.