{"action":"created","comment":{"url":"https://api.github.com/repos/Toblerity/Shapely/pulls/comments/24850142","id":24850142,"diff_hunk":"@@ -41,6 +78,32 @@\n if 'all' in sys.warnoptions:\n     log.level = logging.DEBUG\n \n+\n+class GEOSConfig(object):\n+    \"\"\"Interface to config options from the `geos-config` utility\n+    \"\"\"\n+\n+    def __init__(self, cmd):\n+        self.cmd = cmd\n+\n+    def get(self, option):\n+        try:\n+            output = subprocess.check_output([self.cmd, option])\n+        except OSError as ex:\n+            # e.g., [Errno 2] No such file or directory\n+            raise OSError(\n+                'Could not find geos-config %r: %s' % (self.cmd, ex))\n+        if sys.version_info[0] >= 3:\n+            result = output.decode('ascii').strip()\n+        else:\n+            result = output.strip()\n+        log.debug('%s %s: %r', self.cmd, option, result)\n+        return result\n+\n+    def version(self):\n+        return tuple(map(int, self.get('--version').strip().split('.')))","path":"setup.py","position":95,"original_position":95,"commit_id":"e92e5be9a6ea091b8c87e7218c7e038359577d2b","original_commit_id":"e92e5be9a6ea091b8c87e7218c7e038359577d2b","user":{"login":"mwtoews","id":895458,"avatar_url":"https://avatars.githubusercontent.com/u/895458?v=3","gravatar_id":"","url":"https://api.github.com/users/mwtoews","html_url":"https://github.com/mwtoews","followers_url":"https://api.github.com/users/mwtoews/followers","following_url":"https://api.github.com/users/mwtoews/following{/other_user}","gists_url":"https://api.github.com/users/mwtoews/gists{/gist_id}","starred_url":"https://api.github.com/users/mwtoews/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mwtoews/subscriptions","organizations_url":"https://api.github.com/users/mwtoews/orgs","repos_url":"https://api.github.com/users/mwtoews/repos","events_url":"https://api.github.com/users/mwtoews/events{/privacy}","received_events_url":"https://api.github.com/users/mwtoews/received_events","type":"User","site_admin":false},"body":"Unfortunately, this does not work with development versions of GEOS, which emits, e.g. `3.4.0dev`: \"ValueError: invalid literal for int() with base 10: '0dev'\"","created_at":"2015-02-17T20:21:12Z","updated_at":"2015-02-17T20:21:12Z","html_url":"https://github.com/Toblerity/Shapely/pull/244#discussion_r24850142","pull_request_url":"https://api.github.com/repos/Toblerity/Shapely/pulls/244","_links":{"self":{"href":"https://api.github.com/repos/Toblerity/Shapely/pulls/comments/24850142"},"html":{"href":"https://github.com/Toblerity/Shapely/pull/244#discussion_r24850142"},"pull_request":{"href":"https://api.github.com/repos/Toblerity/Shapely/pulls/244"}}},"pull_request":{"url":"https://api.github.com/repos/Toblerity/Shapely/pulls/244","id":29458694,"html_url":"https://github.com/Toblerity/Shapely/pull/244","diff_url":"https://github.com/Toblerity/Shapely/pull/244.diff","patch_url":"https://github.com/Toblerity/Shapely/pull/244.patch","issue_url":"https://api.github.com/repos/Toblerity/Shapely/issues/244","number":244,"state":"open","locked":false,"title":"Only check with geos-config in setup.","user":{"login":"sgillies","id":33697,"avatar_url":"https://avatars.githubusercontent.com/u/33697?v=3","gravatar_id":"","url":"https://api.github.com/users/sgillies","html_url":"https://github.com/sgillies","followers_url":"https://api.github.com/users/sgillies/followers","following_url":"https://api.github.com/users/sgillies/following{/other_user}","gists_url":"https://api.github.com/users/sgillies/gists{/gist_id}","starred_url":"https://api.github.com/users/sgillies/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sgillies/subscriptions","organizations_url":"https://api.github.com/users/sgillies/orgs","repos_url":"https://api.github.com/users/sgillies/repos","events_url":"https://api.github.com/users/sgillies/events{/privacy}","received_events_url":"https://api.github.com/users/sgillies/received_events","type":"User","site_admin":false},"body":"Do not import shapely.libgeos.","created_at":"2015-02-17T17:01:36Z","updated_at":"2015-02-17T20:21:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b9241d44b1cc007e5905cf6660cd470b98ba34fc","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Toblerity/Shapely/pulls/244/commits","review_comments_url":"https://api.github.com/repos/Toblerity/Shapely/pulls/244/comments","review_comment_url":"https://api.github.com/repos/Toblerity/Shapely/pulls/comments/{number}","comments_url":"https://api.github.com/repos/Toblerity/Shapely/issues/244/comments","statuses_url":"https://api.github.com/repos/Toblerity/Shapely/statuses/e92e5be9a6ea091b8c87e7218c7e038359577d2b","head":{"label":"Toblerity:geos-version-checking","ref":"geos-version-checking","sha":"e92e5be9a6ea091b8c87e7218c7e038359577d2b","user":{"login":"Toblerity","id":859968,"avatar_url":"https://avatars.githubusercontent.com/u/859968?v=3","gravatar_id":"","url":"https://api.github.com/users/Toblerity","html_url":"https://github.com/Toblerity","followers_url":"https://api.github.com/users/Toblerity/followers","following_url":"https://api.github.com/users/Toblerity/following{/other_user}","gists_url":"https://api.github.com/users/Toblerity/gists{/gist_id}","starred_url":"https://api.github.com/users/Toblerity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Toblerity/subscriptions","organizations_url":"https://api.github.com/users/Toblerity/orgs","repos_url":"https://api.github.com/users/Toblerity/repos","events_url":"https://api.github.com/users/Toblerity/events{/privacy}","received_events_url":"https://api.github.com/users/Toblerity/received_events","type":"Organization","site_admin":false},"repo":{"id":3080613,"name":"Shapely","full_name":"Toblerity/Shapely","owner":{"login":"Toblerity","id":859968,"avatar_url":"https://avatars.githubusercontent.com/u/859968?v=3","gravatar_id":"","url":"https://api.github.com/users/Toblerity","html_url":"https://github.com/Toblerity","followers_url":"https://api.github.com/users/Toblerity/followers","following_url":"https://api.github.com/users/Toblerity/following{/other_user}","gists_url":"https://api.github.com/users/Toblerity/gists{/gist_id}","starred_url":"https://api.github.com/users/Toblerity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Toblerity/subscriptions","organizations_url":"https://api.github.com/users/Toblerity/orgs","repos_url":"https://api.github.com/users/Toblerity/repos","events_url":"https://api.github.com/users/Toblerity/events{/privacy}","received_events_url":"https://api.github.com/users/Toblerity/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Toblerity/Shapely","description":"Python package for manipulation and analysis of geometric objects in the Cartesian plane","fork":false,"url":"https://api.github.com/repos/Toblerity/Shapely","forks_url":"https://api.github.com/repos/Toblerity/Shapely/forks","keys_url":"https://api.github.com/repos/Toblerity/Shapely/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Toblerity/Shapely/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Toblerity/Shapely/teams","hooks_url":"https://api.github.com/repos/Toblerity/Shapely/hooks","issue_events_url":"https://api.github.com/repos/Toblerity/Shapely/issues/events{/number}","events_url":"https://api.github.com/repos/Toblerity/Shapely/events","assignees_url":"https://api.github.com/repos/Toblerity/Shapely/assignees{/user}","branches_url":"https://api.github.com/repos/Toblerity/Shapely/branches{/branch}","tags_url":"https://api.github.com/repos/Toblerity/Shapely/tags","blobs_url":"https://api.github.com/repos/Toblerity/Shapely/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Toblerity/Shapely/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Toblerity/Shapely/git/refs{/sha}","trees_url":"https://api.github.com/repos/Toblerity/Shapely/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Toblerity/Shapely/statuses/{sha}","languages_url":"https://api.github.com/repos/Toblerity/Shapely/languages","stargazers_url":"https://api.github.com/repos/Toblerity/Shapely/stargazers","contributors_url":"https://api.github.com/repos/Toblerity/Shapely/contributors","subscribers_url":"https://api.github.com/repos/Toblerity/Shapely/subscribers","subscription_url":"https://api.github.com/repos/Toblerity/Shapely/subscription","commits_url":"https://api.github.com/repos/Toblerity/Shapely/commits{/sha}","git_commits_url":"https://api.github.com/repos/Toblerity/Shapely/git/commits{/sha}","comments_url":"https://api.github.com/repos/Toblerity/Shapely/comments{/number}","issue_comment_url":"https://api.github.com/repos/Toblerity/Shapely/issues/comments/{number}","contents_url":"https://api.github.com/repos/Toblerity/Shapely/contents/{+path}","compare_url":"https://api.github.com/repos/Toblerity/Shapely/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Toblerity/Shapely/merges","archive_url":"https://api.github.com/repos/Toblerity/Shapely/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Toblerity/Shapely/downloads","issues_url":"https://api.github.com/repos/Toblerity/Shapely/issues{/number}","pulls_url":"https://api.github.com/repos/Toblerity/Shapely/pulls{/number}","milestones_url":"https://api.github.com/repos/Toblerity/Shapely/milestones{/number}","notifications_url":"https://api.github.com/repos/Toblerity/Shapely/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Toblerity/Shapely/labels{/name}","releases_url":"https://api.github.com/repos/Toblerity/Shapely/releases{/id}","created_at":"2011-12-31T19:43:11Z","updated_at":"2015-02-17T14:35:06Z","pushed_at":"2015-02-17T16:58:51Z","git_url":"git://github.com/Toblerity/Shapely.git","ssh_url":"git@github.com:Toblerity/Shapely.git","clone_url":"https://github.com/Toblerity/Shapely.git","svn_url":"https://github.com/Toblerity/Shapely","homepage":"http://toblerity.github.com/shapely/","size":3255,"stargazers_count":232,"watchers_count":232,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":100,"mirror_url":null,"open_issues_count":7,"forks":100,"open_issues":7,"watchers":232,"default_branch":"master"}},"base":{"label":"Toblerity:master","ref":"master","sha":"013dc154fc7cf3722835d2fcb1ed0b7d3f718a21","user":{"login":"Toblerity","id":859968,"avatar_url":"https://avatars.githubusercontent.com/u/859968?v=3","gravatar_id":"","url":"https://api.github.com/users/Toblerity","html_url":"https://github.com/Toblerity","followers_url":"https://api.github.com/users/Toblerity/followers","following_url":"https://api.github.com/users/Toblerity/following{/other_user}","gists_url":"https://api.github.com/users/Toblerity/gists{/gist_id}","starred_url":"https://api.github.com/users/Toblerity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Toblerity/subscriptions","organizations_url":"https://api.github.com/users/Toblerity/orgs","repos_url":"https://api.github.com/users/Toblerity/repos","events_url":"https://api.github.com/users/Toblerity/events{/privacy}","received_events_url":"https://api.github.com/users/Toblerity/received_events","type":"Organization","site_admin":false},"repo":{"id":3080613,"name":"Shapely","full_name":"Toblerity/Shapely","owner":{"login":"Toblerity","id":859968,"avatar_url":"https://avatars.githubusercontent.com/u/859968?v=3","gravatar_id":"","url":"https://api.github.com/users/Toblerity","html_url":"https://github.com/Toblerity","followers_url":"https://api.github.com/users/Toblerity/followers","following_url":"https://api.github.com/users/Toblerity/following{/other_user}","gists_url":"https://api.github.com/users/Toblerity/gists{/gist_id}","starred_url":"https://api.github.com/users/Toblerity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Toblerity/subscriptions","organizations_url":"https://api.github.com/users/Toblerity/orgs","repos_url":"https://api.github.com/users/Toblerity/repos","events_url":"https://api.github.com/users/Toblerity/events{/privacy}","received_events_url":"https://api.github.com/users/Toblerity/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Toblerity/Shapely","description":"Python package for manipulation and analysis of geometric objects in the Cartesian plane","fork":false,"url":"https://api.github.com/repos/Toblerity/Shapely","forks_url":"https://api.github.com/repos/Toblerity/Shapely/forks","keys_url":"https://api.github.com/repos/Toblerity/Shapely/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Toblerity/Shapely/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Toblerity/Shapely/teams","hooks_url":"https://api.github.com/repos/Toblerity/Shapely/hooks","issue_events_url":"https://api.github.com/repos/Toblerity/Shapely/issues/events{/number}","events_url":"https://api.github.com/repos/Toblerity/Shapely/events","assignees_url":"https://api.github.com/repos/Toblerity/Shapely/assignees{/user}","branches_url":"https://api.github.com/repos/Toblerity/Shapely/branches{/branch}","tags_url":"https://api.github.com/repos/Toblerity/Shapely/tags","blobs_url":"https://api.github.com/repos/Toblerity/Shapely/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Toblerity/Shapely/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Toblerity/Shapely/git/refs{/sha}","trees_url":"https://api.github.com/repos/Toblerity/Shapely/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Toblerity/Shapely/statuses/{sha}","languages_url":"https://api.github.com/repos/Toblerity/Shapely/languages","stargazers_url":"https://api.github.com/repos/Toblerity/Shapely/stargazers","contributors_url":"https://api.github.com/repos/Toblerity/Shapely/contributors","subscribers_url":"https://api.github.com/repos/Toblerity/Shapely/subscribers","subscription_url":"https://api.github.com/repos/Toblerity/Shapely/subscription","commits_url":"https://api.github.com/repos/Toblerity/Shapely/commits{/sha}","git_commits_url":"https://api.github.com/repos/Toblerity/Shapely/git/commits{/sha}","comments_url":"https://api.github.com/repos/Toblerity/Shapely/comments{/number}","issue_comment_url":"https://api.github.com/repos/Toblerity/Shapely/issues/comments/{number}","contents_url":"https://api.github.com/repos/Toblerity/Shapely/contents/{+path}","compare_url":"https://api.github.com/repos/Toblerity/Shapely/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Toblerity/Shapely/merges","archive_url":"https://api.github.com/repos/Toblerity/Shapely/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Toblerity/Shapely/downloads","issues_url":"https://api.github.com/repos/Toblerity/Shapely/issues{/number}","pulls_url":"https://api.github.com/repos/Toblerity/Shapely/pulls{/number}","milestones_url":"https://api.github.com/repos/Toblerity/Shapely/milestones{/number}","notifications_url":"https://api.github.com/repos/Toblerity/Shapely/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Toblerity/Shapely/labels{/name}","releases_url":"https://api.github.com/repos/Toblerity/Shapely/releases{/id}","created_at":"2011-12-31T19:43:11Z","updated_at":"2015-02-17T14:35:06Z","pushed_at":"2015-02-17T16:58:51Z","git_url":"git://github.com/Toblerity/Shapely.git","ssh_url":"git@github.com:Toblerity/Shapely.git","clone_url":"https://github.com/Toblerity/Shapely.git","svn_url":"https://github.com/Toblerity/Shapely","homepage":"http://toblerity.github.com/shapely/","size":3255,"stargazers_count":232,"watchers_count":232,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":100,"mirror_url":null,"open_issues_count":7,"forks":100,"open_issues":7,"watchers":232,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Toblerity/Shapely/pulls/244"},"html":{"href":"https://github.com/Toblerity/Shapely/pull/244"},"issue":{"href":"https://api.github.com/repos/Toblerity/Shapely/issues/244"},"comments":{"href":"https://api.github.com/repos/Toblerity/Shapely/issues/244/comments"},"review_comments":{"href":"https://api.github.com/repos/Toblerity/Shapely/pulls/244/comments"},"review_comment":{"href":"https://api.github.com/repos/Toblerity/Shapely/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/Toblerity/Shapely/pulls/244/commits"},"statuses":{"href":"https://api.github.com/repos/Toblerity/Shapely/statuses/e92e5be9a6ea091b8c87e7218c7e038359577d2b"}}}}