{"action":"created","comment":{"url":"https://api.github.com/repos/Eyescale/CMake/pulls/comments/31013691","id":31013691,"diff_hunk":"@@ -0,0 +1,86 @@\n+##\n+## Molio\n+##\n+## Copyright (c) 2012-2015 Cajal Blue Brain, BBP/EPFL\n+## All rights reserved. Do not distribute without permission.\n+##\n+## Responsible Author: Juan Hernando Vieites (JHV)\n+## contact: jhernando@fi.upm.es\n+\n+# This script provides an option to choose which Python version should be\n+# requested to FindPythonInterp and FindPythonLibs. The user can choose\n+# between version 2, 3 or autodetection (the default). If\n+# CHOOSE_PYTHON_REQUIRE_BOOST is set, autodetection will choose Python 3 only\n+# if Boost.Python is found to have support for Python 3.\n+#\n+# Input Variables:\n+# * CHOOSE_PYTHON_REQUIRE_BOOST\n+#\n+# Output Variables:\n+# * ${PROJECT_NAME}_USE_PYTHON3: Set to 1 if and only if Python 3 is chosen.\n+# * ${PROJECT_NAME}_USE_BOOST_PYTHON_VERSION: Equals 3 if Python 3 is choosen,\n+#     empty string otherwise\n+# * PYTHON_LIBRARY_SUFFIX: The suffix path where Python site packages are\n+#     to be installed for the chosen Python version.\n+# * PythonLibs_FIND_VERSION\n+#   PythonInter_FIND_VERSION: Variables used by Python find scripts as input.\n+#     Set to 2 or 3 depending on the version chosen.\n+#\n+# Input/output varaibles:\n+# * USE_PYTHON_VERSION: (input/output), the Python version chosen. At return it\n+#   can only be 2 or 3.\n+#\n+# Defines:\n+# * -D${PROJECT_NAME}_USE_PYTHON3=1: If Python 3 is chosen.\n+\n+include(FindBoostConfig) # Including the workarounds for boost finders.\n+\n+set(USE_PYTHON_VERSION \"auto\" CACHE STRING\n+  \"Choose the required Python version (2, 3 or auto).\")\n+\n+set_property(CACHE USE_PYTHON_VERSION PROPERTY STRINGS 2 3 auto)\n+\n+if(NOT PYTHONINTERP_FOUND AND ${USE_PYTHON_VERSION} STREQUAL auto)\n+  find_package(PythonInterp 3 QUIET)\n+  if(CHOOSE_PYTHON_REQUIRE_BOOST)\n+    find_package(Boost COMPONENTS python3 QUIET)\n+  endif()\n+\n+  if(PYTHONINTERP_FOUND AND (NOT CHOOSE_PYTHON_REQUIRE_BOOST OR Boost_FOUND))\n+    set(USE_PYTHON_VERSION 3)","path":"ChoosePython.cmake","position":50,"original_position":50,"commit_id":"2d6c0831ebd376c1a96fb0d69bbd83a650b72c86","original_commit_id":"2d6c0831ebd376c1a96fb0d69bbd83a650b72c86","user":{"login":"hernando","id":791427,"avatar_url":"https://avatars.githubusercontent.com/u/791427?v=3","gravatar_id":"","url":"https://api.github.com/users/hernando","html_url":"https://github.com/hernando","followers_url":"https://api.github.com/users/hernando/followers","following_url":"https://api.github.com/users/hernando/following{/other_user}","gists_url":"https://api.github.com/users/hernando/gists{/gist_id}","starred_url":"https://api.github.com/users/hernando/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hernando/subscriptions","organizations_url":"https://api.github.com/users/hernando/orgs","repos_url":"https://api.github.com/users/hernando/repos","events_url":"https://api.github.com/users/hernando/events{/privacy}","received_events_url":"https://api.github.com/users/hernando/received_events","type":"User","site_admin":false},"body":"It doesn't, but It's not meant to rewrite the cache value (actually I don't care whether it does or not), but to pass the detected version downstream.\r\n","created_at":"2015-05-26T08:33:44Z","updated_at":"2015-05-26T08:33:44Z","html_url":"https://github.com/Eyescale/CMake/pull/320#discussion_r31013691","pull_request_url":"https://api.github.com/repos/Eyescale/CMake/pulls/320","_links":{"self":{"href":"https://api.github.com/repos/Eyescale/CMake/pulls/comments/31013691"},"html":{"href":"https://github.com/Eyescale/CMake/pull/320#discussion_r31013691"},"pull_request":{"href":"https://api.github.com/repos/Eyescale/CMake/pulls/320"}}},"pull_request":{"url":"https://api.github.com/repos/Eyescale/CMake/pulls/320","id":36142671,"html_url":"https://github.com/Eyescale/CMake/pull/320","diff_url":"https://github.com/Eyescale/CMake/pull/320.diff","patch_url":"https://github.com/Eyescale/CMake/pull/320.patch","issue_url":"https://api.github.com/repos/Eyescale/CMake/issues/320","number":320,"state":"open","locked":false,"title":"Added a config script to auto detect the Python version to use.","user":{"login":"hernando","id":791427,"avatar_url":"https://avatars.githubusercontent.com/u/791427?v=3","gravatar_id":"","url":"https://api.github.com/users/hernando","html_url":"https://github.com/hernando","followers_url":"https://api.github.com/users/hernando/followers","following_url":"https://api.github.com/users/hernando/following{/other_user}","gists_url":"https://api.github.com/users/hernando/gists{/gist_id}","starred_url":"https://api.github.com/users/hernando/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hernando/subscriptions","organizations_url":"https://api.github.com/users/hernando/orgs","repos_url":"https://api.github.com/users/hernando/repos","events_url":"https://api.github.com/users/hernando/events{/privacy}","received_events_url":"https://api.github.com/users/hernando/received_events","type":"User","site_admin":false},"body":"Fixed FindNumPy script to work with Python3.","created_at":"2015-05-25T14:26:04Z","updated_at":"2015-05-26T08:33:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b59d629f48807171ef22eafb5d59312e1d546715","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Eyescale/CMake/pulls/320/commits","review_comments_url":"https://api.github.com/repos/Eyescale/CMake/pulls/320/comments","review_comment_url":"https://api.github.com/repos/Eyescale/CMake/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Eyescale/CMake/issues/320/comments","statuses_url":"https://api.github.com/repos/Eyescale/CMake/statuses/2d6c0831ebd376c1a96fb0d69bbd83a650b72c86","head":{"label":"hernando:master","ref":"master","sha":"2d6c0831ebd376c1a96fb0d69bbd83a650b72c86","user":{"login":"hernando","id":791427,"avatar_url":"https://avatars.githubusercontent.com/u/791427?v=3","gravatar_id":"","url":"https://api.github.com/users/hernando","html_url":"https://github.com/hernando","followers_url":"https://api.github.com/users/hernando/followers","following_url":"https://api.github.com/users/hernando/following{/other_user}","gists_url":"https://api.github.com/users/hernando/gists{/gist_id}","starred_url":"https://api.github.com/users/hernando/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hernando/subscriptions","organizations_url":"https://api.github.com/users/hernando/orgs","repos_url":"https://api.github.com/users/hernando/repos","events_url":"https://api.github.com/users/hernando/events{/privacy}","received_events_url":"https://api.github.com/users/hernando/received_events","type":"User","site_admin":false},"repo":{"id":7823647,"name":"CMake","full_name":"hernando/CMake","owner":{"login":"hernando","id":791427,"avatar_url":"https://avatars.githubusercontent.com/u/791427?v=3","gravatar_id":"","url":"https://api.github.com/users/hernando","html_url":"https://github.com/hernando","followers_url":"https://api.github.com/users/hernando/followers","following_url":"https://api.github.com/users/hernando/following{/other_user}","gists_url":"https://api.github.com/users/hernando/gists{/gist_id}","starred_url":"https://api.github.com/users/hernando/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hernando/subscriptions","organizations_url":"https://api.github.com/users/hernando/orgs","repos_url":"https://api.github.com/users/hernando/repos","events_url":"https://api.github.com/users/hernando/events{/privacy}","received_events_url":"https://api.github.com/users/hernando/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hernando/CMake","description":"Common CMake modules","fork":true,"url":"https://api.github.com/repos/hernando/CMake","forks_url":"https://api.github.com/repos/hernando/CMake/forks","keys_url":"https://api.github.com/repos/hernando/CMake/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hernando/CMake/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hernando/CMake/teams","hooks_url":"https://api.github.com/repos/hernando/CMake/hooks","issue_events_url":"https://api.github.com/repos/hernando/CMake/issues/events{/number}","events_url":"https://api.github.com/repos/hernando/CMake/events","assignees_url":"https://api.github.com/repos/hernando/CMake/assignees{/user}","branches_url":"https://api.github.com/repos/hernando/CMake/branches{/branch}","tags_url":"https://api.github.com/repos/hernando/CMake/tags","blobs_url":"https://api.github.com/repos/hernando/CMake/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hernando/CMake/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hernando/CMake/git/refs{/sha}","trees_url":"https://api.github.com/repos/hernando/CMake/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hernando/CMake/statuses/{sha}","languages_url":"https://api.github.com/repos/hernando/CMake/languages","stargazers_url":"https://api.github.com/repos/hernando/CMake/stargazers","contributors_url":"https://api.github.com/repos/hernando/CMake/contributors","subscribers_url":"https://api.github.com/repos/hernando/CMake/subscribers","subscription_url":"https://api.github.com/repos/hernando/CMake/subscription","commits_url":"https://api.github.com/repos/hernando/CMake/commits{/sha}","git_commits_url":"https://api.github.com/repos/hernando/CMake/git/commits{/sha}","comments_url":"https://api.github.com/repos/hernando/CMake/comments{/number}","issue_comment_url":"https://api.github.com/repos/hernando/CMake/issues/comments{/number}","contents_url":"https://api.github.com/repos/hernando/CMake/contents/{+path}","compare_url":"https://api.github.com/repos/hernando/CMake/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hernando/CMake/merges","archive_url":"https://api.github.com/repos/hernando/CMake/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hernando/CMake/downloads","issues_url":"https://api.github.com/repos/hernando/CMake/issues{/number}","pulls_url":"https://api.github.com/repos/hernando/CMake/pulls{/number}","milestones_url":"https://api.github.com/repos/hernando/CMake/milestones{/number}","notifications_url":"https://api.github.com/repos/hernando/CMake/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hernando/CMake/labels{/name}","releases_url":"https://api.github.com/repos/hernando/CMake/releases{/id}","created_at":"2013-01-25T16:18:19Z","updated_at":"2015-05-13T15:32:08Z","pushed_at":"2015-05-25T17:16:57Z","git_url":"git://github.com/hernando/CMake.git","ssh_url":"git@github.com:hernando/CMake.git","clone_url":"https://github.com/hernando/CMake.git","svn_url":"https://github.com/hernando/CMake","homepage":"","size":3603,"stargazers_count":0,"watchers_count":0,"language":"CMake","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Eyescale:master","ref":"master","sha":"c21382509b74174d63ab517438f745230d7e4f9e","user":{"login":"Eyescale","id":354955,"avatar_url":"https://avatars.githubusercontent.com/u/354955?v=3","gravatar_id":"","url":"https://api.github.com/users/Eyescale","html_url":"https://github.com/Eyescale","followers_url":"https://api.github.com/users/Eyescale/followers","following_url":"https://api.github.com/users/Eyescale/following{/other_user}","gists_url":"https://api.github.com/users/Eyescale/gists{/gist_id}","starred_url":"https://api.github.com/users/Eyescale/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Eyescale/subscriptions","organizations_url":"https://api.github.com/users/Eyescale/orgs","repos_url":"https://api.github.com/users/Eyescale/repos","events_url":"https://api.github.com/users/Eyescale/events{/privacy}","received_events_url":"https://api.github.com/users/Eyescale/received_events","type":"Organization","site_admin":false},"repo":{"id":3774178,"name":"CMake","full_name":"Eyescale/CMake","owner":{"login":"Eyescale","id":354955,"avatar_url":"https://avatars.githubusercontent.com/u/354955?v=3","gravatar_id":"","url":"https://api.github.com/users/Eyescale","html_url":"https://github.com/Eyescale","followers_url":"https://api.github.com/users/Eyescale/followers","following_url":"https://api.github.com/users/Eyescale/following{/other_user}","gists_url":"https://api.github.com/users/Eyescale/gists{/gist_id}","starred_url":"https://api.github.com/users/Eyescale/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Eyescale/subscriptions","organizations_url":"https://api.github.com/users/Eyescale/orgs","repos_url":"https://api.github.com/users/Eyescale/repos","events_url":"https://api.github.com/users/Eyescale/events{/privacy}","received_events_url":"https://api.github.com/users/Eyescale/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Eyescale/CMake","description":"Common CMake modules","fork":false,"url":"https://api.github.com/repos/Eyescale/CMake","forks_url":"https://api.github.com/repos/Eyescale/CMake/forks","keys_url":"https://api.github.com/repos/Eyescale/CMake/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Eyescale/CMake/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Eyescale/CMake/teams","hooks_url":"https://api.github.com/repos/Eyescale/CMake/hooks","issue_events_url":"https://api.github.com/repos/Eyescale/CMake/issues/events{/number}","events_url":"https://api.github.com/repos/Eyescale/CMake/events","assignees_url":"https://api.github.com/repos/Eyescale/CMake/assignees{/user}","branches_url":"https://api.github.com/repos/Eyescale/CMake/branches{/branch}","tags_url":"https://api.github.com/repos/Eyescale/CMake/tags","blobs_url":"https://api.github.com/repos/Eyescale/CMake/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Eyescale/CMake/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Eyescale/CMake/git/refs{/sha}","trees_url":"https://api.github.com/repos/Eyescale/CMake/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Eyescale/CMake/statuses/{sha}","languages_url":"https://api.github.com/repos/Eyescale/CMake/languages","stargazers_url":"https://api.github.com/repos/Eyescale/CMake/stargazers","contributors_url":"https://api.github.com/repos/Eyescale/CMake/contributors","subscribers_url":"https://api.github.com/repos/Eyescale/CMake/subscribers","subscription_url":"https://api.github.com/repos/Eyescale/CMake/subscription","commits_url":"https://api.github.com/repos/Eyescale/CMake/commits{/sha}","git_commits_url":"https://api.github.com/repos/Eyescale/CMake/git/commits{/sha}","comments_url":"https://api.github.com/repos/Eyescale/CMake/comments{/number}","issue_comment_url":"https://api.github.com/repos/Eyescale/CMake/issues/comments{/number}","contents_url":"https://api.github.com/repos/Eyescale/CMake/contents/{+path}","compare_url":"https://api.github.com/repos/Eyescale/CMake/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Eyescale/CMake/merges","archive_url":"https://api.github.com/repos/Eyescale/CMake/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Eyescale/CMake/downloads","issues_url":"https://api.github.com/repos/Eyescale/CMake/issues{/number}","pulls_url":"https://api.github.com/repos/Eyescale/CMake/pulls{/number}","milestones_url":"https://api.github.com/repos/Eyescale/CMake/milestones{/number}","notifications_url":"https://api.github.com/repos/Eyescale/CMake/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Eyescale/CMake/labels{/name}","releases_url":"https://api.github.com/repos/Eyescale/CMake/releases{/id}","created_at":"2012-03-20T10:50:06Z","updated_at":"2015-05-07T12:01:25Z","pushed_at":"2015-05-25T17:16:57Z","git_url":"git://github.com/Eyescale/CMake.git","ssh_url":"git@github.com:Eyescale/CMake.git","clone_url":"https://github.com/Eyescale/CMake.git","svn_url":"https://github.com/Eyescale/CMake","homepage":"","size":6121,"stargazers_count":16,"watchers_count":16,"language":"CMake","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":30,"mirror_url":null,"open_issues_count":2,"forks":30,"open_issues":2,"watchers":16,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Eyescale/CMake/pulls/320"},"html":{"href":"https://github.com/Eyescale/CMake/pull/320"},"issue":{"href":"https://api.github.com/repos/Eyescale/CMake/issues/320"},"comments":{"href":"https://api.github.com/repos/Eyescale/CMake/issues/320/comments"},"review_comments":{"href":"https://api.github.com/repos/Eyescale/CMake/pulls/320/comments"},"review_comment":{"href":"https://api.github.com/repos/Eyescale/CMake/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Eyescale/CMake/pulls/320/commits"},"statuses":{"href":"https://api.github.com/repos/Eyescale/CMake/statuses/2d6c0831ebd376c1a96fb0d69bbd83a650b72c86"}}}}