{"action":"created","comment":{"url":"https://api.github.com/repos/astropy/astropy-helpers/pulls/comments/176430911","pull_request_review_id":106130453,"id":176430911,"diff_hunk":"@@ -39,6 +41,34 @@\n }\n \"\"\"\n \n+def _split_option_from_var(option, var, delim=' '):\n+    if not var or not option:\n+        return None\n+    l = len(option)\n+    if not l:\n+        return None\n+\n+    if var in os.environ:\n+        for flag in os.environ.split(delim):\n+            if option in flag[:l]:\n+                return flag[l:]\n+\n+    # os.environ was unsuccesful so Look in sysconfig\n+    try:\n+        flags = get_config_var(var)\n+    except KeyError:\n+        return None\n+    if flags:\n+        for flag in flags.split(delim):\n+            if option in flag[:l]:\n+                return flag[l:]\n+    return None\n+\n+def _get_include_path():\n+    return _split_option_from_var('-I', 'CFLAGS')\n+\n+def _get_library_path():\n+    return _split_option_from_var('-L', 'LDFLAGS')\n \n def add_openmp_flags_if_available(extension):","path":"astropy_helpers/openmp_helpers.py","position":54,"original_position":54,"commit_id":"0eaacc90ecd47245050369d7b89a149139368538","original_commit_id":"0eaacc90ecd47245050369d7b89a149139368538","user":{"login":"astrofrog","id":314716,"avatar_url":"https://avatars2.githubusercontent.com/u/314716?v=4","gravatar_id":"","url":"https://api.github.com/users/astrofrog","html_url":"https://github.com/astrofrog","followers_url":"https://api.github.com/users/astrofrog/followers","following_url":"https://api.github.com/users/astrofrog/following{/other_user}","gists_url":"https://api.github.com/users/astrofrog/gists{/gist_id}","starred_url":"https://api.github.com/users/astrofrog/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/astrofrog/subscriptions","organizations_url":"https://api.github.com/users/astrofrog/orgs","repos_url":"https://api.github.com/users/astrofrog/repos","events_url":"https://api.github.com/users/astrofrog/events{/privacy}","received_events_url":"https://api.github.com/users/astrofrog/received_events","type":"User","site_admin":false},"body":"I don't know if it's super important to have the semantically correct name, you can always just put a comment above the call to the function to explain what it does in that case?","created_at":"2018-03-22T14:04:56Z","updated_at":"2018-03-22T14:04:56Z","html_url":"https://github.com/astropy/astropy-helpers/pull/382#discussion_r176430911","pull_request_url":"https://api.github.com/repos/astropy/astropy-helpers/pulls/382","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/astropy/astropy-helpers/pulls/comments/176430911"},"html":{"href":"https://github.com/astropy/astropy-helpers/pull/382#discussion_r176430911"},"pull_request":{"href":"https://api.github.com/repos/astropy/astropy-helpers/pulls/382"}},"in_reply_to_id":176383180},"pull_request":{"url":"https://api.github.com/repos/astropy/astropy-helpers/pulls/382","id":174713220,"html_url":"https://github.com/astropy/astropy-helpers/pull/382","diff_url":"https://github.com/astropy/astropy-helpers/pull/382.diff","patch_url":"https://github.com/astropy/astropy-helpers/pull/382.patch","issue_url":"https://api.github.com/repos/astropy/astropy-helpers/issues/382","number":382,"state":"open","locked":false,"title":"Make add_openmp_flags_if_available() work for clang","user":{"login":"jamienoss","id":5013975,"avatar_url":"https://avatars2.githubusercontent.com/u/5013975?v=4","gravatar_id":"","url":"https://api.github.com/users/jamienoss","html_url":"https://github.com/jamienoss","followers_url":"https://api.github.com/users/jamienoss/followers","following_url":"https://api.github.com/users/jamienoss/following{/other_user}","gists_url":"https://api.github.com/users/jamienoss/gists{/gist_id}","starred_url":"https://api.github.com/users/jamienoss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamienoss/subscriptions","organizations_url":"https://api.github.com/users/jamienoss/orgs","repos_url":"https://api.github.com/users/jamienoss/repos","events_url":"https://api.github.com/users/jamienoss/events{/privacy}","received_events_url":"https://api.github.com/users/jamienoss/received_events","type":"User","site_admin":false},"body":"The small openmp C test code, used to determine if openmp works, fails to build with clang due to missing include and library paths for openmp. When run, it then fails due to rpath (runtime path) issues.\r\n    \r\nThis PR adds the necessary include, library, and runtime paths to the build.\r\n\r\nSigned-off-by: James Noss <jnoss@stsci.edu>","created_at":"2018-03-13T16:18:01Z","updated_at":"2018-03-22T14:04:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5df0fdeed0cd7e403b0212493db32e0971659578","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/astropy/astropy-helpers/pulls/382/commits","review_comments_url":"https://api.github.com/repos/astropy/astropy-helpers/pulls/382/comments","review_comment_url":"https://api.github.com/repos/astropy/astropy-helpers/pulls/comments{/number}","comments_url":"https://api.github.com/repos/astropy/astropy-helpers/issues/382/comments","statuses_url":"https://api.github.com/repos/astropy/astropy-helpers/statuses/0eaacc90ecd47245050369d7b89a149139368538","head":{"label":"jamienoss:openmp.pr","ref":"openmp.pr","sha":"0eaacc90ecd47245050369d7b89a149139368538","user":{"login":"jamienoss","id":5013975,"avatar_url":"https://avatars2.githubusercontent.com/u/5013975?v=4","gravatar_id":"","url":"https://api.github.com/users/jamienoss","html_url":"https://github.com/jamienoss","followers_url":"https://api.github.com/users/jamienoss/followers","following_url":"https://api.github.com/users/jamienoss/following{/other_user}","gists_url":"https://api.github.com/users/jamienoss/gists{/gist_id}","starred_url":"https://api.github.com/users/jamienoss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamienoss/subscriptions","organizations_url":"https://api.github.com/users/jamienoss/orgs","repos_url":"https://api.github.com/users/jamienoss/repos","events_url":"https://api.github.com/users/jamienoss/events{/privacy}","received_events_url":"https://api.github.com/users/jamienoss/received_events","type":"User","site_admin":false},"repo":{"id":122532566,"name":"astropy-helpers","full_name":"jamienoss/astropy-helpers","owner":{"login":"jamienoss","id":5013975,"avatar_url":"https://avatars2.githubusercontent.com/u/5013975?v=4","gravatar_id":"","url":"https://api.github.com/users/jamienoss","html_url":"https://github.com/jamienoss","followers_url":"https://api.github.com/users/jamienoss/followers","following_url":"https://api.github.com/users/jamienoss/following{/other_user}","gists_url":"https://api.github.com/users/jamienoss/gists{/gist_id}","starred_url":"https://api.github.com/users/jamienoss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamienoss/subscriptions","organizations_url":"https://api.github.com/users/jamienoss/orgs","repos_url":"https://api.github.com/users/jamienoss/repos","events_url":"https://api.github.com/users/jamienoss/events{/privacy}","received_events_url":"https://api.github.com/users/jamienoss/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jamienoss/astropy-helpers","description":"Helpers for Astropy and Affiliated packages","fork":true,"url":"https://api.github.com/repos/jamienoss/astropy-helpers","forks_url":"https://api.github.com/repos/jamienoss/astropy-helpers/forks","keys_url":"https://api.github.com/repos/jamienoss/astropy-helpers/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jamienoss/astropy-helpers/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jamienoss/astropy-helpers/teams","hooks_url":"https://api.github.com/repos/jamienoss/astropy-helpers/hooks","issue_events_url":"https://api.github.com/repos/jamienoss/astropy-helpers/issues/events{/number}","events_url":"https://api.github.com/repos/jamienoss/astropy-helpers/events","assignees_url":"https://api.github.com/repos/jamienoss/astropy-helpers/assignees{/user}","branches_url":"https://api.github.com/repos/jamienoss/astropy-helpers/branches{/branch}","tags_url":"https://api.github.com/repos/jamienoss/astropy-helpers/tags","blobs_url":"https://api.github.com/repos/jamienoss/astropy-helpers/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jamienoss/astropy-helpers/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jamienoss/astropy-helpers/git/refs{/sha}","trees_url":"https://api.github.com/repos/jamienoss/astropy-helpers/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jamienoss/astropy-helpers/statuses/{sha}","languages_url":"https://api.github.com/repos/jamienoss/astropy-helpers/languages","stargazers_url":"https://api.github.com/repos/jamienoss/astropy-helpers/stargazers","contributors_url":"https://api.github.com/repos/jamienoss/astropy-helpers/contributors","subscribers_url":"https://api.github.com/repos/jamienoss/astropy-helpers/subscribers","subscription_url":"https://api.github.com/repos/jamienoss/astropy-helpers/subscription","commits_url":"https://api.github.com/repos/jamienoss/astropy-helpers/commits{/sha}","git_commits_url":"https://api.github.com/repos/jamienoss/astropy-helpers/git/commits{/sha}","comments_url":"https://api.github.com/repos/jamienoss/astropy-helpers/comments{/number}","issue_comment_url":"https://api.github.com/repos/jamienoss/astropy-helpers/issues/comments{/number}","contents_url":"https://api.github.com/repos/jamienoss/astropy-helpers/contents/{+path}","compare_url":"https://api.github.com/repos/jamienoss/astropy-helpers/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jamienoss/astropy-helpers/merges","archive_url":"https://api.github.com/repos/jamienoss/astropy-helpers/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jamienoss/astropy-helpers/downloads","issues_url":"https://api.github.com/repos/jamienoss/astropy-helpers/issues{/number}","pulls_url":"https://api.github.com/repos/jamienoss/astropy-helpers/pulls{/number}","milestones_url":"https://api.github.com/repos/jamienoss/astropy-helpers/milestones{/number}","notifications_url":"https://api.github.com/repos/jamienoss/astropy-helpers/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jamienoss/astropy-helpers/labels{/name}","releases_url":"https://api.github.com/repos/jamienoss/astropy-helpers/releases{/id}","deployments_url":"https://api.github.com/repos/jamienoss/astropy-helpers/deployments","created_at":"2018-02-22T20:39:15Z","updated_at":"2018-02-22T20:39:18Z","pushed_at":"2018-03-21T00:54:53Z","git_url":"git://github.com/jamienoss/astropy-helpers.git","ssh_url":"git@github.com:jamienoss/astropy-helpers.git","clone_url":"https://github.com/jamienoss/astropy-helpers.git","svn_url":"https://github.com/jamienoss/astropy-helpers","homepage":null,"size":1169,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"astropy:master","ref":"master","sha":"6a6d40322d30739581503d5c4ab7b5264d110f81","user":{"login":"astropy","id":847984,"avatar_url":"https://avatars0.githubusercontent.com/u/847984?v=4","gravatar_id":"","url":"https://api.github.com/users/astropy","html_url":"https://github.com/astropy","followers_url":"https://api.github.com/users/astropy/followers","following_url":"https://api.github.com/users/astropy/following{/other_user}","gists_url":"https://api.github.com/users/astropy/gists{/gist_id}","starred_url":"https://api.github.com/users/astropy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/astropy/subscriptions","organizations_url":"https://api.github.com/users/astropy/orgs","repos_url":"https://api.github.com/users/astropy/repos","events_url":"https://api.github.com/users/astropy/events{/privacy}","received_events_url":"https://api.github.com/users/astropy/received_events","type":"Organization","site_admin":false},"repo":{"id":14448779,"name":"astropy-helpers","full_name":"astropy/astropy-helpers","owner":{"login":"astropy","id":847984,"avatar_url":"https://avatars0.githubusercontent.com/u/847984?v=4","gravatar_id":"","url":"https://api.github.com/users/astropy","html_url":"https://github.com/astropy","followers_url":"https://api.github.com/users/astropy/followers","following_url":"https://api.github.com/users/astropy/following{/other_user}","gists_url":"https://api.github.com/users/astropy/gists{/gist_id}","starred_url":"https://api.github.com/users/astropy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/astropy/subscriptions","organizations_url":"https://api.github.com/users/astropy/orgs","repos_url":"https://api.github.com/users/astropy/repos","events_url":"https://api.github.com/users/astropy/events{/privacy}","received_events_url":"https://api.github.com/users/astropy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/astropy/astropy-helpers","description":"Helpers for Astropy and Affiliated packages","fork":false,"url":"https://api.github.com/repos/astropy/astropy-helpers","forks_url":"https://api.github.com/repos/astropy/astropy-helpers/forks","keys_url":"https://api.github.com/repos/astropy/astropy-helpers/keys{/key_id}","collaborators_url":"https://api.github.com/repos/astropy/astropy-helpers/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/astropy/astropy-helpers/teams","hooks_url":"https://api.github.com/repos/astropy/astropy-helpers/hooks","issue_events_url":"https://api.github.com/repos/astropy/astropy-helpers/issues/events{/number}","events_url":"https://api.github.com/repos/astropy/astropy-helpers/events","assignees_url":"https://api.github.com/repos/astropy/astropy-helpers/assignees{/user}","branches_url":"https://api.github.com/repos/astropy/astropy-helpers/branches{/branch}","tags_url":"https://api.github.com/repos/astropy/astropy-helpers/tags","blobs_url":"https://api.github.com/repos/astropy/astropy-helpers/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/astropy/astropy-helpers/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/astropy/astropy-helpers/git/refs{/sha}","trees_url":"https://api.github.com/repos/astropy/astropy-helpers/git/trees{/sha}","statuses_url":"https://api.github.com/repos/astropy/astropy-helpers/statuses/{sha}","languages_url":"https://api.github.com/repos/astropy/astropy-helpers/languages","stargazers_url":"https://api.github.com/repos/astropy/astropy-helpers/stargazers","contributors_url":"https://api.github.com/repos/astropy/astropy-helpers/contributors","subscribers_url":"https://api.github.com/repos/astropy/astropy-helpers/subscribers","subscription_url":"https://api.github.com/repos/astropy/astropy-helpers/subscription","commits_url":"https://api.github.com/repos/astropy/astropy-helpers/commits{/sha}","git_commits_url":"https://api.github.com/repos/astropy/astropy-helpers/git/commits{/sha}","comments_url":"https://api.github.com/repos/astropy/astropy-helpers/comments{/number}","issue_comment_url":"https://api.github.com/repos/astropy/astropy-helpers/issues/comments{/number}","contents_url":"https://api.github.com/repos/astropy/astropy-helpers/contents/{+path}","compare_url":"https://api.github.com/repos/astropy/astropy-helpers/compare/{base}...{head}","merges_url":"https://api.github.com/repos/astropy/astropy-helpers/merges","archive_url":"https://api.github.com/repos/astropy/astropy-helpers/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/astropy/astropy-helpers/downloads","issues_url":"https://api.github.com/repos/astropy/astropy-helpers/issues{/number}","pulls_url":"https://api.github.com/repos/astropy/astropy-helpers/pulls{/number}","milestones_url":"https://api.github.com/repos/astropy/astropy-helpers/milestones{/number}","notifications_url":"https://api.github.com/repos/astropy/astropy-helpers/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/astropy/astropy-helpers/labels{/name}","releases_url":"https://api.github.com/repos/astropy/astropy-helpers/releases{/id}","deployments_url":"https://api.github.com/repos/astropy/astropy-helpers/deployments","created_at":"2013-11-16T15:01:42Z","updated_at":"2018-03-22T11:04:36Z","pushed_at":"2018-03-22T11:04:33Z","git_url":"git://github.com/astropy/astropy-helpers.git","ssh_url":"git@github.com:astropy/astropy-helpers.git","clone_url":"https://github.com/astropy/astropy-helpers.git","svn_url":"https://github.com/astropy/astropy-helpers","homepage":null,"size":1173,"stargazers_count":14,"watchers_count":14,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":37,"mirror_url":null,"archived":false,"open_issues_count":37,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause"},"forks":37,"open_issues":37,"watchers":14,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/astropy/astropy-helpers/pulls/382"},"html":{"href":"https://github.com/astropy/astropy-helpers/pull/382"},"issue":{"href":"https://api.github.com/repos/astropy/astropy-helpers/issues/382"},"comments":{"href":"https://api.github.com/repos/astropy/astropy-helpers/issues/382/comments"},"review_comments":{"href":"https://api.github.com/repos/astropy/astropy-helpers/pulls/382/comments"},"review_comment":{"href":"https://api.github.com/repos/astropy/astropy-helpers/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/astropy/astropy-helpers/pulls/382/commits"},"statuses":{"href":"https://api.github.com/repos/astropy/astropy-helpers/statuses/0eaacc90ecd47245050369d7b89a149139368538"}},"author_association":"NONE"}}
{"actor":{"display_login":"astrofrog"}}