Uriziel/syncplay — pull request #30 by blaenk (2013-12-18 06:58:28+00:00)
Title: make syncplay packageable

This is just an idea I guess, but I tested it and it works both with regular `sudo make install` as well as the package that I created.

There's now a marker in the client and server that is just `# libpath` which gets substituted in the makefile with sed to `site.addsitedir` with the path to the syncplay module files, effectively adding the syncplay module files in `whatever/lib` to the files that python searches for during an `import`.

So yeah, I tested it and it works fine on its own (i.e. regular `sudo make install`). All I do on my own end with the arch package is yet again run sed to replace python with python2 in the client and the server. This is expected/common in arch packages for python programs.

I tried to change as little as possible. I had to add `${PREFIX}` to each of the path variables because the arch package needs some way to specify the prefix at which to install the stuff. This is otherwise empty (if the user doesn't specify it) so it should be of no consequence to anyone else.

A last minor note is that I do the replacement with sed after the file has been copied to its installation, to preserve a pristine copy in the source directory.