{"action":"created","issue":{"url":"https://api.github.com/repos/moyaproject/moya/issues/5","labels_url":"https://api.github.com/repos/moyaproject/moya/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/moyaproject/moya/issues/5/comments","events_url":"https://api.github.com/repos/moyaproject/moya/issues/5/events","html_url":"https://github.com/moyaproject/moya/issues/5","id":91626353,"number":5,"title":"Installation on OSX is broken ","user":{"login":"karstenw","id":652583,"avatar_url":"https://avatars.githubusercontent.com/u/652583?v=3","gravatar_id":"","url":"https://api.github.com/users/karstenw","html_url":"https://github.com/karstenw","followers_url":"https://api.github.com/users/karstenw/followers","following_url":"https://api.github.com/users/karstenw/following{/other_user}","gists_url":"https://api.github.com/users/karstenw/gists{/gist_id}","starred_url":"https://api.github.com/users/karstenw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karstenw/subscriptions","organizations_url":"https://api.github.com/users/karstenw/orgs","repos_url":"https://api.github.com/users/karstenw/repos","events_url":"https://api.github.com/users/karstenw/events{/privacy}","received_events_url":"https://api.github.com/users/karstenw/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-06-28T18:51:16Z","updated_at":"2015-09-06T20:01:51Z","closed_at":null,"body":"moya neither compiles nor installs (sudo pip...) on OSX 10.6 and Python 2.7.9 (32-bit intel).\r\n\r\nIt breaks on installing 'pyinotify' which seem to be a Linux only package.\r\n\r\nFrom the build log:\r\n```\r\n...\r\nRequirement already satisfied (use --upgrade to upgrade): requests in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/requests-2.6.0-py2.7.egg (from moya)\r\nRequirement already satisfied (use --upgrade to upgrade): lxml in /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from moya)\r\nCollecting colorama (from moya)\r\n  Downloading colorama-0.3.3.tar.gz\r\nCollecting premailer (from moya)\r\n  Downloading premailer-2.9.2-py2-none-any.whl\r\nCollecting pyinotify (from moya)\r\n  Downloading pyinotify-0.9.6.tar.gz (60kB)\r\n    100% |################################| 61kB 1.3MB/s \r\n    Complete output from command python setup.py egg_info:\r\n    inotify is not available on macosx-10.4-i386\r\n    \r\n    ----------------------------------------\r\nCommand \"python setup.py egg_info\" failed with error code 1 in /private/tmp/pip-build-Hdm94F/pyinotify\r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/moyaproject/moya/issues/comments/138122476","html_url":"https://github.com/moyaproject/moya/issues/5#issuecomment-138122476","issue_url":"https://api.github.com/repos/moyaproject/moya/issues/5","id":138122476,"user":{"login":"karstenw","id":652583,"avatar_url":"https://avatars.githubusercontent.com/u/652583?v=3","gravatar_id":"","url":"https://api.github.com/users/karstenw","html_url":"https://github.com/karstenw","followers_url":"https://api.github.com/users/karstenw/followers","following_url":"https://api.github.com/users/karstenw/following{/other_user}","gists_url":"https://api.github.com/users/karstenw/gists{/gist_id}","starred_url":"https://api.github.com/users/karstenw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karstenw/subscriptions","organizations_url":"https://api.github.com/users/karstenw/orgs","repos_url":"https://api.github.com/users/karstenw/repos","events_url":"https://api.github.com/users/karstenw/events{/privacy}","received_events_url":"https://api.github.com/users/karstenw/received_events","type":"User","site_admin":false},"created_at":"2015-09-06T20:01:51Z","updated_at":"2015-09-06T20:01:51Z","body":"I started debugging this (the linenumbers don't match the source since it's sprinkled with 'pdb.set_trace()):\r\n\r\n```python\r\n> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/moya-0.5.21a1-py2.7.egg/moya/command/sub/templatebuilder.py(41)write_file()\r\n-> with fs.open(filename, 'wt') as f:\r\n(Pdb) pp locals()\r\n{'file_lines': [u'# encoding=UTF-8',\r\n                u'from __future__ import unicode_literals',\r\n                u'from moya.wsgi import Application',\r\n                u'',\r\n                u\"application = Application('./', ['local.ini', 'production.ini'], server='main', logging='prodlogging.ini')\"],\r\n 'file_type': u'TEXT',\r\n 'filename': u'/wsgi.py',\r\n 'fs': MemoryFS()}\r\n(Pdb) l\r\n 36  \t    file_lines = []\r\n 37  \t\r\n 38  \t    def write_file(filename, file_type):\r\n 39  \t        if filename:\r\n 40  \t            if file_type.lower() == \"text\":\r\n 41  ->\t                with fs.open(filename, 'wt') as f:\r\n 42  \t                    f.write('\\n'.join(file_lines) + '\\n')\r\n 43  \t            elif file_type.lower() == \"wraptext\":\r\n 44  \t                import textwrap\r\n 45  \t                with fs.open(filename, 'wt') as f:\r\n 46  \t                    for line in file_lines:\r\n(Pdb) n\r\nLookupError: 'unknown encoding: '\r\n> /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/moya-0.5.21a1-py2.7.egg/moya/command/sub/templatebuilder.py(41)write_file()\r\n-> with fs.open(filename, 'wt') as f:\r\n(Pdb) p filename\r\nu'/wsgi.py'\r\n```"}}