{"action":"created","issue":{"url":"https://api.github.com/repos/mcvittal/qpy/issues/1","repository_url":"https://api.github.com/repos/mcvittal/qpy","labels_url":"https://api.github.com/repos/mcvittal/qpy/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/mcvittal/qpy/issues/1/comments","events_url":"https://api.github.com/repos/mcvittal/qpy/issues/1/events","html_url":"https://github.com/mcvittal/qpy/issues/1","id":130783023,"number":1,"title":"PyPI and Windows support","user":{"login":"micahcochran","id":7433104,"avatar_url":"https://avatars.githubusercontent.com/u/7433104?v=3","gravatar_id":"","url":"https://api.github.com/users/micahcochran","html_url":"https://github.com/micahcochran","followers_url":"https://api.github.com/users/micahcochran/followers","following_url":"https://api.github.com/users/micahcochran/following{/other_user}","gists_url":"https://api.github.com/users/micahcochran/gists{/gist_id}","starred_url":"https://api.github.com/users/micahcochran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/micahcochran/subscriptions","organizations_url":"https://api.github.com/users/micahcochran/orgs","repos_url":"https://api.github.com/users/micahcochran/repos","events_url":"https://api.github.com/users/micahcochran/events{/privacy}","received_events_url":"https://api.github.com/users/micahcochran/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"mcvittal","id":5225746,"avatar_url":"https://avatars.githubusercontent.com/u/5225746?v=3","gravatar_id":"","url":"https://api.github.com/users/mcvittal","html_url":"https://github.com/mcvittal","followers_url":"https://api.github.com/users/mcvittal/followers","following_url":"https://api.github.com/users/mcvittal/following{/other_user}","gists_url":"https://api.github.com/users/mcvittal/gists{/gist_id}","starred_url":"https://api.github.com/users/mcvittal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcvittal/subscriptions","organizations_url":"https://api.github.com/users/mcvittal/orgs","repos_url":"https://api.github.com/users/mcvittal/repos","events_url":"https://api.github.com/users/mcvittal/events{/privacy}","received_events_url":"https://api.github.com/users/mcvittal/received_events","type":"User","site_admin":false},"assignees":[{"login":"mcvittal","id":5225746,"avatar_url":"https://avatars.githubusercontent.com/u/5225746?v=3","gravatar_id":"","url":"https://api.github.com/users/mcvittal","html_url":"https://github.com/mcvittal","followers_url":"https://api.github.com/users/mcvittal/followers","following_url":"https://api.github.com/users/mcvittal/following{/other_user}","gists_url":"https://api.github.com/users/mcvittal/gists{/gist_id}","starred_url":"https://api.github.com/users/mcvittal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcvittal/subscriptions","organizations_url":"https://api.github.com/users/mcvittal/orgs","repos_url":"https://api.github.com/users/mcvittal/repos","events_url":"https://api.github.com/users/mcvittal/events{/privacy}","received_events_url":"https://api.github.com/users/mcvittal/received_events","type":"User","site_admin":false}],"milestone":null,"comments":10,"created_at":"2016-02-02T19:05:07Z","updated_at":"2016-10-21T20:59:30Z","closed_at":null,"body":"PyPI is a website that  makes it easy to install python modules with the command `$ (sudo) pip install qpy`.  Someone would need make a setup.py, but it makes installation a snap for end users.  You can check in the module if `import qgis` works.\r\n\r\n[Qpy seems to already be a package on PyPi](https://pypi.python.org/pypi/qpy/) for XML parsing.  Perhaps a name change?\r\n\r\n```Python\r\nsys.path.append('/usr/share/qgis/python/plugins')\r\n```\r\nFor Windows using OSGeo4W--one of the recommended ways to installed QGIS on Windows--I commented that out and added this `sys.path.append(r'C:\\OSGeo4W\\apps\\qgis\\python\\plugins')`.\r\n\r\nIt could be modified like this:\r\n```Python\r\nimport platform\r\nif platform.system == 'Windows':\r\n    sys.path.append(r'C:\\OSGeo4W\\apps\\qgis\\python\\plugins')\r\nelse:\r\n    sys.path.append('/usr/share/qgis/python/plugins')\r\n```\r\nThere has to be a better way, but it would probably take a few more lines of code.\r\n\r\nNote: I did get `import qpy` to work on OSGeo4W, but it took a few extra steps.  I'll do some testing to see what I can break.  :smiling_imp: "},"comment":{"url":"https://api.github.com/repos/mcvittal/qpy/issues/comments/255463803","html_url":"https://github.com/mcvittal/qpy/issues/1#issuecomment-255463803","issue_url":"https://api.github.com/repos/mcvittal/qpy/issues/1","id":255463803,"user":{"login":"micahcochran","id":7433104,"avatar_url":"https://avatars.githubusercontent.com/u/7433104?v=3","gravatar_id":"","url":"https://api.github.com/users/micahcochran","html_url":"https://github.com/micahcochran","followers_url":"https://api.github.com/users/micahcochran/followers","following_url":"https://api.github.com/users/micahcochran/following{/other_user}","gists_url":"https://api.github.com/users/micahcochran/gists{/gist_id}","starred_url":"https://api.github.com/users/micahcochran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/micahcochran/subscriptions","organizations_url":"https://api.github.com/users/micahcochran/orgs","repos_url":"https://api.github.com/users/micahcochran/repos","events_url":"https://api.github.com/users/micahcochran/events{/privacy}","received_events_url":"https://api.github.com/users/micahcochran/received_events","type":"User","site_admin":false},"created_at":"2016-10-21T20:59:30Z","updated_at":"2016-10-21T20:59:30Z","body":"Good point.\r\nThis could also be done with runtime environment variables.  OSGeo4W has a batchfile that sets up the environment, C:\\OSGeo4W\\OSGeo4W.bat  \r\n\r\nYou'd set that environment variable up and it is done.  This does require some manual editing, but I think it would work fine for OSGeo4W.  It would not work so well for other Windows installations.\r\n\r\nSearching the path sounds a a bit ugly for qpy to have to do every time."}}
{"actor":{"display_login":"micahcochran"}}