mopidy/mopidy — pull request #655 by abarisain (2014-01-19 22:19:48+00:00)
Title: Make mopidy usuable on Windows

Hello !
I've been trying to run Mopidy on Windows lately, and I finally managed to do it (it was even easier than to try on OSX). It was not easy, but if you want to, I can write a tutorial to get you up and running.

This is not without issues and requires, as expected, some patches to Mopidy. I don't know if you want to start supporting that platform.

Some bugs and crashes remains, but for the moment I can run mopidy, mopidy-MPD and mopidy-gmusic. Browsing the library and playback work fine, but I have not yet tested the rest (mopidy-local, mopidy-spotify, etc ...)

The first patch is straightforward. Windows has no SIGUSR1, so we don't listen to this signal. (http://www.parallelpython.com/component/option,com_smf/Itemid,1/topic,710.0)

I am not sure if you will like my second patch. At first, I was tempted to make the IPv6 check if `socket.IPPROTO_IPV6` was not defined, but Windows doesn't allow you to bind on "0.0.0.0" easily (and the config file prevents you from using an empty hostname, which is what python excepts for INADDR_ALL), so I extracted the constant values from Windows' headers. I really doubt that these constants will ever change, and Python 2.7 will never have them bundled. http://bugs.python.org/issue6926

Anyway, here is a screenshot of Mopidy working on Windows :)
![image2014-01-19 at 11 10 43 pm](https://f.cloud.github.com/assets/312529/1950764/ccc7201a-8157-11e3-8439-9126caa175ca.png)