{"action":"closed","number":1409,"pull_request":{"url":"https://api.github.com/repos/micropython/micropython/pulls/1409","id":41506761,"html_url":"https://github.com/micropython/micropython/pull/1409","diff_url":"https://github.com/micropython/micropython/pull/1409.diff","patch_url":"https://github.com/micropython/micropython/pull/1409.patch","issue_url":"https://api.github.com/repos/micropython/micropython/issues/1409","number":1409,"state":"closed","locked":false,"title":"unix: set MICROPY_PY_SYS_PLATFORM to \"darwin\" if compiled on OSX","user":{"login":"blmorris","id":6295715,"avatar_url":"https://avatars.githubusercontent.com/u/6295715?v=3","gravatar_id":"","url":"https://api.github.com/users/blmorris","html_url":"https://github.com/blmorris","followers_url":"https://api.github.com/users/blmorris/followers","following_url":"https://api.github.com/users/blmorris/following{/other_user}","gists_url":"https://api.github.com/users/blmorris/gists{/gist_id}","starred_url":"https://api.github.com/users/blmorris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blmorris/subscriptions","organizations_url":"https://api.github.com/users/blmorris/orgs","repos_url":"https://api.github.com/users/blmorris/repos","events_url":"https://api.github.com/users/blmorris/events{/privacy}","received_events_url":"https://api.github.com/users/blmorris/received_events","type":"User","site_admin":false},"body":"Currently `sys.platform` returns a different value from CPython when running on OSX:\r\n\r\n```\r\nbryans-computer:unix bryan$ ./micropython\r\nMicro Python v1.4.4-172-g4434e43 on 2015-08-03; linux version\r\n>>> import sys\r\n>>> sys.platform\r\n'linux'\r\n>>> \r\nbryans-computer:unix bryan$ python3\r\nPython 3.4.3 (default, May 25 2015, 18:55:23) \r\n[GCC 4.2.1 Compatible Apple LLVM 4.2 (clang-425.0.28)] on darwin\r\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\r\n>>> import sys\r\n>>> sys.platform\r\n'darwin'\r\n>>> \r\n```\r\nWith this change both the greeting and `sys.platform` show 'darwin' instead of 'linux':\r\n```\r\nbryan-morrisseys-computer:unix bryan$ ./micropython\r\nMicro Python v1.4.4-173-g2dfb1e5 on 2015-08-03; darwin version\r\n>>> import sys\r\n>>> sys.platform\r\n'darwin'\r\n>>> \r\n```\r\nEDIT: Original commit has been amended to match indentation style","created_at":"2015-08-03T20:33:34Z","updated_at":"2015-08-08T09:04:59Z","closed_at":"2015-08-08T09:04:59Z","merged_at":null,"merge_commit_sha":"3989479401b391dfc8c1571409a3bd5545a301a7","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/micropython/micropython/pulls/1409/commits","review_comments_url":"https://api.github.com/repos/micropython/micropython/pulls/1409/comments","review_comment_url":"https://api.github.com/repos/micropython/micropython/pulls/comments{/number}","comments_url":"https://api.github.com/repos/micropython/micropython/issues/1409/comments","statuses_url":"https://api.github.com/repos/micropython/micropython/statuses/692eca117a4a447a6ffef87cf5c8c57d92416af8","head":{"label":"blmorris:sys-platform","ref":"sys-platform","sha":"692eca117a4a447a6ffef87cf5c8c57d92416af8","user":{"login":"blmorris","id":6295715,"avatar_url":"https://avatars.githubusercontent.com/u/6295715?v=3","gravatar_id":"","url":"https://api.github.com/users/blmorris","html_url":"https://github.com/blmorris","followers_url":"https://api.github.com/users/blmorris/followers","following_url":"https://api.github.com/users/blmorris/following{/other_user}","gists_url":"https://api.github.com/users/blmorris/gists{/gist_id}","starred_url":"https://api.github.com/users/blmorris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blmorris/subscriptions","organizations_url":"https://api.github.com/users/blmorris/orgs","repos_url":"https://api.github.com/users/blmorris/repos","events_url":"https://api.github.com/users/blmorris/events{/privacy}","received_events_url":"https://api.github.com/users/blmorris/received_events","type":"User","site_admin":false},"repo":{"id":26868195,"name":"micropython","full_name":"blmorris/micropython","owner":{"login":"blmorris","id":6295715,"avatar_url":"https://avatars.githubusercontent.com/u/6295715?v=3","gravatar_id":"","url":"https://api.github.com/users/blmorris","html_url":"https://github.com/blmorris","followers_url":"https://api.github.com/users/blmorris/followers","following_url":"https://api.github.com/users/blmorris/following{/other_user}","gists_url":"https://api.github.com/users/blmorris/gists{/gist_id}","starred_url":"https://api.github.com/users/blmorris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blmorris/subscriptions","organizations_url":"https://api.github.com/users/blmorris/orgs","repos_url":"https://api.github.com/users/blmorris/repos","events_url":"https://api.github.com/users/blmorris/events{/privacy}","received_events_url":"https://api.github.com/users/blmorris/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/blmorris/micropython","description":"The Micro Python project","fork":true,"url":"https://api.github.com/repos/blmorris/micropython","forks_url":"https://api.github.com/repos/blmorris/micropython/forks","keys_url":"https://api.github.com/repos/blmorris/micropython/keys{/key_id}","collaborators_url":"https://api.github.com/repos/blmorris/micropython/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/blmorris/micropython/teams","hooks_url":"https://api.github.com/repos/blmorris/micropython/hooks","issue_events_url":"https://api.github.com/repos/blmorris/micropython/issues/events{/number}","events_url":"https://api.github.com/repos/blmorris/micropython/events","assignees_url":"https://api.github.com/repos/blmorris/micropython/assignees{/user}","branches_url":"https://api.github.com/repos/blmorris/micropython/branches{/branch}","tags_url":"https://api.github.com/repos/blmorris/micropython/tags","blobs_url":"https://api.github.com/repos/blmorris/micropython/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/blmorris/micropython/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/blmorris/micropython/git/refs{/sha}","trees_url":"https://api.github.com/repos/blmorris/micropython/git/trees{/sha}","statuses_url":"https://api.github.com/repos/blmorris/micropython/statuses/{sha}","languages_url":"https://api.github.com/repos/blmorris/micropython/languages","stargazers_url":"https://api.github.com/repos/blmorris/micropython/stargazers","contributors_url":"https://api.github.com/repos/blmorris/micropython/contributors","subscribers_url":"https://api.github.com/repos/blmorris/micropython/subscribers","subscription_url":"https://api.github.com/repos/blmorris/micropython/subscription","commits_url":"https://api.github.com/repos/blmorris/micropython/commits{/sha}","git_commits_url":"https://api.github.com/repos/blmorris/micropython/git/commits{/sha}","comments_url":"https://api.github.com/repos/blmorris/micropython/comments{/number}","issue_comment_url":"https://api.github.com/repos/blmorris/micropython/issues/comments{/number}","contents_url":"https://api.github.com/repos/blmorris/micropython/contents/{+path}","compare_url":"https://api.github.com/repos/blmorris/micropython/compare/{base}...{head}","merges_url":"https://api.github.com/repos/blmorris/micropython/merges","archive_url":"https://api.github.com/repos/blmorris/micropython/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/blmorris/micropython/downloads","issues_url":"https://api.github.com/repos/blmorris/micropython/issues{/number}","pulls_url":"https://api.github.com/repos/blmorris/micropython/pulls{/number}","milestones_url":"https://api.github.com/repos/blmorris/micropython/milestones{/number}","notifications_url":"https://api.github.com/repos/blmorris/micropython/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/blmorris/micropython/labels{/name}","releases_url":"https://api.github.com/repos/blmorris/micropython/releases{/id}","created_at":"2014-11-19T15:41:24Z","updated_at":"2015-04-17T12:56:01Z","pushed_at":"2015-08-04T23:56:25Z","git_url":"git://github.com/blmorris/micropython.git","ssh_url":"git@github.com:blmorris/micropython.git","clone_url":"https://github.com/blmorris/micropython.git","svn_url":"https://github.com/blmorris/micropython","homepage":null,"size":21155,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"micropython:master","ref":"master","sha":"4434e43fa150eee99cc120e97c26ad6b3fa8a15d","user":{"login":"micropython","id":6298560,"avatar_url":"https://avatars.githubusercontent.com/u/6298560?v=3","gravatar_id":"","url":"https://api.github.com/users/micropython","html_url":"https://github.com/micropython","followers_url":"https://api.github.com/users/micropython/followers","following_url":"https://api.github.com/users/micropython/following{/other_user}","gists_url":"https://api.github.com/users/micropython/gists{/gist_id}","starred_url":"https://api.github.com/users/micropython/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/micropython/subscriptions","organizations_url":"https://api.github.com/users/micropython/orgs","repos_url":"https://api.github.com/users/micropython/repos","events_url":"https://api.github.com/users/micropython/events{/privacy}","received_events_url":"https://api.github.com/users/micropython/received_events","type":"Organization","site_admin":false},"repo":{"id":15337142,"name":"micropython","full_name":"micropython/micropython","owner":{"login":"micropython","id":6298560,"avatar_url":"https://avatars.githubusercontent.com/u/6298560?v=3","gravatar_id":"","url":"https://api.github.com/users/micropython","html_url":"https://github.com/micropython","followers_url":"https://api.github.com/users/micropython/followers","following_url":"https://api.github.com/users/micropython/following{/other_user}","gists_url":"https://api.github.com/users/micropython/gists{/gist_id}","starred_url":"https://api.github.com/users/micropython/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/micropython/subscriptions","organizations_url":"https://api.github.com/users/micropython/orgs","repos_url":"https://api.github.com/users/micropython/repos","events_url":"https://api.github.com/users/micropython/events{/privacy}","received_events_url":"https://api.github.com/users/micropython/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/micropython/micropython","description":"MicroPython - a lean and efficient Python implementation for microcontrollers and constrained systems","fork":false,"url":"https://api.github.com/repos/micropython/micropython","forks_url":"https://api.github.com/repos/micropython/micropython/forks","keys_url":"https://api.github.com/repos/micropython/micropython/keys{/key_id}","collaborators_url":"https://api.github.com/repos/micropython/micropython/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/micropython/micropython/teams","hooks_url":"https://api.github.com/repos/micropython/micropython/hooks","issue_events_url":"https://api.github.com/repos/micropython/micropython/issues/events{/number}","events_url":"https://api.github.com/repos/micropython/micropython/events","assignees_url":"https://api.github.com/repos/micropython/micropython/assignees{/user}","branches_url":"https://api.github.com/repos/micropython/micropython/branches{/branch}","tags_url":"https://api.github.com/repos/micropython/micropython/tags","blobs_url":"https://api.github.com/repos/micropython/micropython/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/micropython/micropython/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/micropython/micropython/git/refs{/sha}","trees_url":"https://api.github.com/repos/micropython/micropython/git/trees{/sha}","statuses_url":"https://api.github.com/repos/micropython/micropython/statuses/{sha}","languages_url":"https://api.github.com/repos/micropython/micropython/languages","stargazers_url":"https://api.github.com/repos/micropython/micropython/stargazers","contributors_url":"https://api.github.com/repos/micropython/micropython/contributors","subscribers_url":"https://api.github.com/repos/micropython/micropython/subscribers","subscription_url":"https://api.github.com/repos/micropython/micropython/subscription","commits_url":"https://api.github.com/repos/micropython/micropython/commits{/sha}","git_commits_url":"https://api.github.com/repos/micropython/micropython/git/commits{/sha}","comments_url":"https://api.github.com/repos/micropython/micropython/comments{/number}","issue_comment_url":"https://api.github.com/repos/micropython/micropython/issues/comments{/number}","contents_url":"https://api.github.com/repos/micropython/micropython/contents/{+path}","compare_url":"https://api.github.com/repos/micropython/micropython/compare/{base}...{head}","merges_url":"https://api.github.com/repos/micropython/micropython/merges","archive_url":"https://api.github.com/repos/micropython/micropython/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/micropython/micropython/downloads","issues_url":"https://api.github.com/repos/micropython/micropython/issues{/number}","pulls_url":"https://api.github.com/repos/micropython/micropython/pulls{/number}","milestones_url":"https://api.github.com/repos/micropython/micropython/milestones{/number}","notifications_url":"https://api.github.com/repos/micropython/micropython/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/micropython/micropython/labels{/name}","releases_url":"https://api.github.com/repos/micropython/micropython/releases{/id}","created_at":"2013-12-20T11:47:07Z","updated_at":"2015-08-08T02:50:26Z","pushed_at":"2015-08-07T10:55:30Z","git_url":"git://github.com/micropython/micropython.git","ssh_url":"git@github.com:micropython/micropython.git","clone_url":"https://github.com/micropython/micropython.git","svn_url":"https://github.com/micropython/micropython","homepage":"","size":47152,"stargazers_count":2075,"watchers_count":2075,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":389,"mirror_url":null,"open_issues_count":150,"forks":389,"open_issues":150,"watchers":2075,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/micropython/micropython/pulls/1409"},"html":{"href":"https://github.com/micropython/micropython/pull/1409"},"issue":{"href":"https://api.github.com/repos/micropython/micropython/issues/1409"},"comments":{"href":"https://api.github.com/repos/micropython/micropython/issues/1409/comments"},"review_comments":{"href":"https://api.github.com/repos/micropython/micropython/pulls/1409/comments"},"review_comment":{"href":"https://api.github.com/repos/micropython/micropython/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/micropython/micropython/pulls/1409/commits"},"statuses":{"href":"https://api.github.com/repos/micropython/micropython/statuses/692eca117a4a447a6ffef87cf5c8c57d92416af8"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":12,"review_comments":0,"commits":1,"additions":5,"deletions":1,"changed_files":1}}