pagekite/Mailpile — pull request #606 by dlmueller (2014-04-16 17:18:25+00:00)
Title: Make mailpile importable under Windows

As stated in issue #486 the GnuPG interface in mailpile/crypto is currently unusable on Windows or even not importable since the module 'fcntl' is not available under Windows. Therefore I removed some unused import of 'fcntl' under mailpile/crypto and wrapped the import of 'fcntl' within crypto/gpgi.py within a try-except-ImportError block.

The behaviour under Unix/Linux should be the same, but since I currently do not have a Unix/Linux machine I could not verify this assumption. If the module 'fcntl' is not available, a clear NotImplementedError will be raised.I plan to implement a Windows binding to gpg.exe via subprocess within the next days. Maybe blocking in the first place, and none-blocking some days later, if the recipe descripted here will work:
https://stackoverflow.com/questions/375427/non-blocking-read-on-a-subprocess-pipe-in-python

To make mailpile fully importable under Windows I also had to wrap the import of Unix-only module 'readline' within a try-except-ImportError block.

I've also added 'markupsafe' to the lisf of required modules, since I had to install it to import mailpile. I also added 'nose' since I found it within the Makefile.