{"action":"created","issue":{"url":"https://api.github.com/repos/spyder-ide/spyder/issues/2377","labels_url":"https://api.github.com/repos/spyder-ide/spyder/issues/2377/labels{/name}","comments_url":"https://api.github.com/repos/spyder-ide/spyder/issues/2377/comments","events_url":"https://api.github.com/repos/spyder-ide/spyder/issues/2377/events","html_url":"https://github.com/spyder-ide/spyder/pull/2377","id":71706489,"number":2377,"title":"Fix the fact that spyder_win_post_install.py can't be run from pip","user":{"login":"mikofski","id":1385621,"avatar_url":"https://avatars.githubusercontent.com/u/1385621?v=3","gravatar_id":"","url":"https://api.github.com/users/mikofski","html_url":"https://github.com/mikofski","followers_url":"https://api.github.com/users/mikofski/followers","following_url":"https://api.github.com/users/mikofski/following{/other_user}","gists_url":"https://api.github.com/users/mikofski/gists{/gist_id}","starred_url":"https://api.github.com/users/mikofski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikofski/subscriptions","organizations_url":"https://api.github.com/users/mikofski/orgs","repos_url":"https://api.github.com/users/mikofski/repos","events_url":"https://api.github.com/users/mikofski/events{/privacy}","received_events_url":"https://api.github.com/users/mikofski/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/spyder-ide/spyder/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/spyder-ide/spyder/labels/Maintainability","name":"Maintainability","color":"5319e7"}],"state":"open","locked":false,"assignee":{"login":"ccordoba12","id":365293,"avatar_url":"https://avatars.githubusercontent.com/u/365293?v=3","gravatar_id":"","url":"https://api.github.com/users/ccordoba12","html_url":"https://github.com/ccordoba12","followers_url":"https://api.github.com/users/ccordoba12/followers","following_url":"https://api.github.com/users/ccordoba12/following{/other_user}","gists_url":"https://api.github.com/users/ccordoba12/gists{/gist_id}","starred_url":"https://api.github.com/users/ccordoba12/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ccordoba12/subscriptions","organizations_url":"https://api.github.com/users/ccordoba12/orgs","repos_url":"https://api.github.com/users/ccordoba12/repos","events_url":"https://api.github.com/users/ccordoba12/events{/privacy}","received_events_url":"https://api.github.com/users/ccordoba12/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/spyder-ide/spyder/milestones/5","html_url":"https://github.com/spyder-ide/spyder/milestones/v3.0","labels_url":"https://api.github.com/repos/spyder-ide/spyder/milestones/5/labels","id":982077,"number":5,"title":"v3.0","description":"","creator":{"login":"spyder-issues-migrator","id":11021581,"avatar_url":"https://avatars.githubusercontent.com/u/11021581?v=3","gravatar_id":"","url":"https://api.github.com/users/spyder-issues-migrator","html_url":"https://github.com/spyder-issues-migrator","followers_url":"https://api.github.com/users/spyder-issues-migrator/followers","following_url":"https://api.github.com/users/spyder-issues-migrator/following{/other_user}","gists_url":"https://api.github.com/users/spyder-issues-migrator/gists{/gist_id}","starred_url":"https://api.github.com/users/spyder-issues-migrator/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spyder-issues-migrator/subscriptions","organizations_url":"https://api.github.com/users/spyder-issues-migrator/orgs","repos_url":"https://api.github.com/users/spyder-issues-migrator/repos","events_url":"https://api.github.com/users/spyder-issues-migrator/events{/privacy}","received_events_url":"https://api.github.com/users/spyder-issues-migrator/received_events","type":"User","site_admin":false},"open_issues":267,"closed_issues":68,"state":"open","created_at":"2015-02-16T23:17:23Z","updated_at":"2015-05-01T22:17:59Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2015-04-28T21:25:22Z","updated_at":"2015-05-01T22:23:43Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/spyder-ide/spyder/pulls/2377","html_url":"https://github.com/spyder-ide/spyder/pull/2377","diff_url":"https://github.com/spyder-ide/spyder/pull/2377.diff","patch_url":"https://github.com/spyder-ide/spyder/pull/2377.patch"},"body":"Fixes #2188\r\n\r\n----\r\n\r\n* add missing `bdist_wininst` functions from `pywin32_postinstall.py`:\r\n `file_created()`, `directory_created()`, `get_root_key()`, `create_shortcut()`\r\n and `get_special_folder_path()`\r\n* test for `pythoncom` and return message \"pywin32 required\" on `ImportError`\r\n* replace `CSIDL_COMMON_PROGRAMS` with `CSIDL_PROGRAMS` to be consistent with\r\n desktop shortcut which is in user profile, and so that user doesn't have\r\n to elevate rights in order to install Spyder\r\n* add TODO to remove error message \"try running installer as\r\n administrator\" since it's unnecessary if admin rights not required.\r\n* if running `spyder_win_post_install.py -install` manually after installing\r\n with pip, then `spyder.ico` and `spyder_light.ico` are in the\r\n `Python27\\Scripts\\` folder not in the distribution folder, so check if\r\n `ico_dir` exists and use absolute path to `spyder_win_post_install.__file__`\r\n* clean up desktop and start menu shortcuts on removal\r\n* provide feedback on successful removal of context, desktop and start\r\n menu shortcuts\r\n\r\nSigned-off-by: Mark Mikofski <mark.mikofski@sunpowercorp.com>"},"comment":{"url":"https://api.github.com/repos/spyder-ide/spyder/issues/comments/98254291","html_url":"https://github.com/spyder-ide/spyder/pull/2377#issuecomment-98254291","issue_url":"https://api.github.com/repos/spyder-ide/spyder/issues/2377","id":98254291,"user":{"login":"ccordoba12","id":365293,"avatar_url":"https://avatars.githubusercontent.com/u/365293?v=3","gravatar_id":"","url":"https://api.github.com/users/ccordoba12","html_url":"https://github.com/ccordoba12","followers_url":"https://api.github.com/users/ccordoba12/followers","following_url":"https://api.github.com/users/ccordoba12/following{/other_user}","gists_url":"https://api.github.com/users/ccordoba12/gists{/gist_id}","starred_url":"https://api.github.com/users/ccordoba12/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ccordoba12/subscriptions","organizations_url":"https://api.github.com/users/ccordoba12/orgs","repos_url":"https://api.github.com/users/ccordoba12/repos","events_url":"https://api.github.com/users/ccordoba12/events{/privacy}","received_events_url":"https://api.github.com/users/ccordoba12/received_events","type":"User","site_admin":false},"created_at":"2015-05-01T22:23:43Z","updated_at":"2015-05-01T22:23:43Z","body":"One thing that I'd like to know is if it's possible to tell pip to run this script after install/uninstall steps.\r\n\r\nI mean, can't we add something to `setup.py` to make this happen automatically?"}}