{"action":"opened","number":65,"pull_request":{"url":"https://api.github.com/repos/wjakob/pybind11/pulls/65","id":55788155,"html_url":"https://github.com/wjakob/pybind11/pull/65","diff_url":"https://github.com/wjakob/pybind11/pull/65.diff","patch_url":"https://github.com/wjakob/pybind11/pull/65.patch","issue_url":"https://api.github.com/repos/wjakob/pybind11/issues/65","number":65,"state":"open","locked":false,"title":"Tell cmake to use EXACT python version (from PYBIND11_PYTHON_VERSION).","user":{"login":"nbigaouette","id":112988,"avatar_url":"https://avatars.githubusercontent.com/u/112988?v=3","gravatar_id":"","url":"https://api.github.com/users/nbigaouette","html_url":"https://github.com/nbigaouette","followers_url":"https://api.github.com/users/nbigaouette/followers","following_url":"https://api.github.com/users/nbigaouette/following{/other_user}","gists_url":"https://api.github.com/users/nbigaouette/gists{/gist_id}","starred_url":"https://api.github.com/users/nbigaouette/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nbigaouette/subscriptions","organizations_url":"https://api.github.com/users/nbigaouette/orgs","repos_url":"https://api.github.com/users/nbigaouette/repos","events_url":"https://api.github.com/users/nbigaouette/events{/privacy}","received_events_url":"https://api.github.com/users/nbigaouette/received_events","type":"User","site_admin":false},"body":"This should insure that both the `PythonLibs` and `PythonInterp` points to\r\nthe same python version.\r\n\r\nWithout this, the Python library and interpreter might not match version.\r\nFor example, if both Python 2.7 and 3.4 is installed, `PythonLibs` will\r\nfind /usr/lib/x86_64-linux-gnu/libpython3.4m.so while\r\n`PythonInterp` will find /usr/bin/python2.7 (at least on Ubuntu 14.04).\r\n\r\nWhen `PythonLibs` and `PythonInterp` don't point to the same Python version,\r\nthe examples will all fail:\r\n\r\n```bash\r\n$ cmake ..\r\n-- The C compiler identification is GNU 4.8.4\r\n-- The CXX compiler identification is GNU 4.8.4\r\n-- Check for working C compiler: /usr/bin/cc\r\n-- Check for working C compiler: /usr/bin/cc -- works\r\n-- Detecting C compiler ABI info\r\n-- Detecting C compiler ABI info - done\r\n-- Check for working CXX compiler: /usr/bin/c++\r\n-- Check for working CXX compiler: /usr/bin/c++ -- works\r\n-- Detecting CXX compiler ABI info\r\n-- Detecting CXX compiler ABI info - done\r\n-- Setting build type to 'MinSizeRel' as none was specified.\r\n-- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython3.4m.so (found suitable version \"3.4.3\", minimum required is \"2.7\")\r\n-- Found PythonInterp: /usr/bin/python2.7 (found suitable version \"2.7.6\", minimum required is \"2.7\")\r\n-- Performing Test HAS_LTO_FLAG\r\n-- Performing Test HAS_LTO_FLAG - Success\r\n-- Configuring done\r\n-- Generating done\r\n-- Build files have been written to: /home/nbigaouette/pybind11/build\r\n$ make test\r\nRunning tests...\r\nTest project /home/nbigaouette/pybind11/build\r\n      Start  1: example1\r\n 1/12 Test  #1: example1 .........................***Failed    0.02 sec\r\n      Start  2: example2\r\n 2/12 Test  #2: example2 .........................***Failed    0.03 sec\r\n      Start  3: example3\r\n 3/12 Test  #3: example3 .........................***Failed    0.02 sec\r\n      Start  4: example4\r\n 4/12 Test  #4: example4 .........................***Failed    0.02 sec\r\n      Start  5: example5\r\n 5/12 Test  #5: example5 .........................***Failed    0.02 sec\r\n      Start  6: example6\r\n 6/12 Test  #6: example6 .........................***Failed    0.02 sec\r\n      Start  7: example7\r\n 7/12 Test  #7: example7 .........................***Failed    0.02 sec\r\n      Start  8: example8\r\n 8/12 Test  #8: example8 .........................***Failed    0.02 sec\r\n      Start  9: example9\r\n 9/12 Test  #9: example9 .........................***Failed    0.02 sec\r\n      Start 10: example10\r\n10/12 Test #10: example10 ........................***Failed    0.02 sec\r\n      Start 11: example11\r\n11/12 Test #11: example11 ........................***Failed    0.03 sec\r\n      Start 12: example12\r\n12/12 Test #12: example12 ........................***Failed    0.02 sec\r\n\r\n0% tests passed, 12 tests failed out of 12\r\n\r\nTotal Test time (real) =   0.25 sec\r\n\r\nThe following tests FAILED:\r\n          1 - example1 (Failed)\r\n          2 - example2 (Failed)\r\n          3 - example3 (Failed)\r\n          4 - example4 (Failed)\r\n          5 - example5 (Failed)\r\n          6 - example6 (Failed)\r\n          7 - example7 (Failed)\r\n          8 - example8 (Failed)\r\n          9 - example9 (Failed)\r\n         10 - example10 (Failed)\r\n         11 - example11 (Failed)\r\n         12 - example12 (Failed)\r\nErrors while running CTest\r\nmake: *** [test] Error 8\r\n```\r\n\r\nBy adding the `EXACT` version to the `find_package()` calls, the version\r\ndiscrepancy is at least caught at the cmake call:\r\n\r\n```bash\r\n$ cmake ..\r\n-- The C compiler identification is GNU 4.8.4\r\n-- The CXX compiler identification is GNU 4.8.4\r\n-- Check for working C compiler: /usr/bin/cc\r\n-- Check for working C compiler: /usr/bin/cc -- works\r\n-- Detecting C compiler ABI info\r\n-- Detecting C compiler ABI info - done\r\n-- Check for working CXX compiler: /usr/bin/c++\r\n-- Check for working CXX compiler: /usr/bin/c++ -- works\r\n-- Detecting CXX compiler ABI info\r\n-- Detecting CXX compiler ABI info - done\r\n-- Setting build type to 'MinSizeRel' as none was specified.\r\nCMake Error at /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:108 (message):\r\n  Could NOT find PythonLibs: Found unsuitable version \"3.4.3\", but required\r\n  is exact version \"2.7\" (found /usr/lib/x86_64-linux-gnu/libpython3.4m.so)\r\nCall Stack (most recent call first):\r\n  /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:313 (_FPHSA_FAILURE_MESSAGE)\r\n  /usr/share/cmake-2.8/Modules/FindPythonLibs.cmake:208 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)\r\n  CMakeLists.txt:27 (find_package)\r\n\r\n\r\n-- Configuring incomplete, errors occurred!\r\nSee also \"/home/nbigaouette/pybind11/build/CMakeFiles/CMakeOutput.log\".\r\n```","created_at":"2016-01-12T17:14:16Z","updated_at":"2016-01-12T17:14:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/wjakob/pybind11/pulls/65/commits","review_comments_url":"https://api.github.com/repos/wjakob/pybind11/pulls/65/comments","review_comment_url":"https://api.github.com/repos/wjakob/pybind11/pulls/comments{/number}","comments_url":"https://api.github.com/repos/wjakob/pybind11/issues/65/comments","statuses_url":"https://api.github.com/repos/wjakob/pybind11/statuses/2f97147fc7f25b63d91767cf6aa03c661e24b7e6","head":{"label":"nbigaouette:master","ref":"master","sha":"2f97147fc7f25b63d91767cf6aa03c661e24b7e6","user":{"login":"nbigaouette","id":112988,"avatar_url":"https://avatars.githubusercontent.com/u/112988?v=3","gravatar_id":"","url":"https://api.github.com/users/nbigaouette","html_url":"https://github.com/nbigaouette","followers_url":"https://api.github.com/users/nbigaouette/followers","following_url":"https://api.github.com/users/nbigaouette/following{/other_user}","gists_url":"https://api.github.com/users/nbigaouette/gists{/gist_id}","starred_url":"https://api.github.com/users/nbigaouette/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nbigaouette/subscriptions","organizations_url":"https://api.github.com/users/nbigaouette/orgs","repos_url":"https://api.github.com/users/nbigaouette/repos","events_url":"https://api.github.com/users/nbigaouette/events{/privacy}","received_events_url":"https://api.github.com/users/nbigaouette/received_events","type":"User","site_admin":false},"repo":{"id":49515423,"name":"pybind11","full_name":"nbigaouette/pybind11","owner":{"login":"nbigaouette","id":112988,"avatar_url":"https://avatars.githubusercontent.com/u/112988?v=3","gravatar_id":"","url":"https://api.github.com/users/nbigaouette","html_url":"https://github.com/nbigaouette","followers_url":"https://api.github.com/users/nbigaouette/followers","following_url":"https://api.github.com/users/nbigaouette/following{/other_user}","gists_url":"https://api.github.com/users/nbigaouette/gists{/gist_id}","starred_url":"https://api.github.com/users/nbigaouette/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nbigaouette/subscriptions","organizations_url":"https://api.github.com/users/nbigaouette/orgs","repos_url":"https://api.github.com/users/nbigaouette/repos","events_url":"https://api.github.com/users/nbigaouette/events{/privacy}","received_events_url":"https://api.github.com/users/nbigaouette/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nbigaouette/pybind11","description":"Seamless operability between C++11 and Python","fork":true,"url":"https://api.github.com/repos/nbigaouette/pybind11","forks_url":"https://api.github.com/repos/nbigaouette/pybind11/forks","keys_url":"https://api.github.com/repos/nbigaouette/pybind11/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nbigaouette/pybind11/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nbigaouette/pybind11/teams","hooks_url":"https://api.github.com/repos/nbigaouette/pybind11/hooks","issue_events_url":"https://api.github.com/repos/nbigaouette/pybind11/issues/events{/number}","events_url":"https://api.github.com/repos/nbigaouette/pybind11/events","assignees_url":"https://api.github.com/repos/nbigaouette/pybind11/assignees{/user}","branches_url":"https://api.github.com/repos/nbigaouette/pybind11/branches{/branch}","tags_url":"https://api.github.com/repos/nbigaouette/pybind11/tags","blobs_url":"https://api.github.com/repos/nbigaouette/pybind11/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nbigaouette/pybind11/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nbigaouette/pybind11/git/refs{/sha}","trees_url":"https://api.github.com/repos/nbigaouette/pybind11/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nbigaouette/pybind11/statuses/{sha}","languages_url":"https://api.github.com/repos/nbigaouette/pybind11/languages","stargazers_url":"https://api.github.com/repos/nbigaouette/pybind11/stargazers","contributors_url":"https://api.github.com/repos/nbigaouette/pybind11/contributors","subscribers_url":"https://api.github.com/repos/nbigaouette/pybind11/subscribers","subscription_url":"https://api.github.com/repos/nbigaouette/pybind11/subscription","commits_url":"https://api.github.com/repos/nbigaouette/pybind11/commits{/sha}","git_commits_url":"https://api.github.com/repos/nbigaouette/pybind11/git/commits{/sha}","comments_url":"https://api.github.com/repos/nbigaouette/pybind11/comments{/number}","issue_comment_url":"https://api.github.com/repos/nbigaouette/pybind11/issues/comments{/number}","contents_url":"https://api.github.com/repos/nbigaouette/pybind11/contents/{+path}","compare_url":"https://api.github.com/repos/nbigaouette/pybind11/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nbigaouette/pybind11/merges","archive_url":"https://api.github.com/repos/nbigaouette/pybind11/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nbigaouette/pybind11/downloads","issues_url":"https://api.github.com/repos/nbigaouette/pybind11/issues{/number}","pulls_url":"https://api.github.com/repos/nbigaouette/pybind11/pulls{/number}","milestones_url":"https://api.github.com/repos/nbigaouette/pybind11/milestones{/number}","notifications_url":"https://api.github.com/repos/nbigaouette/pybind11/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nbigaouette/pybind11/labels{/name}","releases_url":"https://api.github.com/repos/nbigaouette/pybind11/releases{/id}","created_at":"2016-01-12T17:02:36Z","updated_at":"2016-01-12T17:02:37Z","pushed_at":"2016-01-12T17:13:25Z","git_url":"git://github.com/nbigaouette/pybind11.git","ssh_url":"git@github.com:nbigaouette/pybind11.git","clone_url":"https://github.com/nbigaouette/pybind11.git","svn_url":"https://github.com/nbigaouette/pybind11","homepage":null,"size":346,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"wjakob:master","ref":"master","sha":"f08a3f0622c259c95a761dd11eba320e725dc606","user":{"login":"wjakob","id":1203629,"avatar_url":"https://avatars.githubusercontent.com/u/1203629?v=3","gravatar_id":"","url":"https://api.github.com/users/wjakob","html_url":"https://github.com/wjakob","followers_url":"https://api.github.com/users/wjakob/followers","following_url":"https://api.github.com/users/wjakob/following{/other_user}","gists_url":"https://api.github.com/users/wjakob/gists{/gist_id}","starred_url":"https://api.github.com/users/wjakob/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wjakob/subscriptions","organizations_url":"https://api.github.com/users/wjakob/orgs","repos_url":"https://api.github.com/users/wjakob/repos","events_url":"https://api.github.com/users/wjakob/events{/privacy}","received_events_url":"https://api.github.com/users/wjakob/received_events","type":"User","site_admin":false},"repo":{"id":38581626,"name":"pybind11","full_name":"wjakob/pybind11","owner":{"login":"wjakob","id":1203629,"avatar_url":"https://avatars.githubusercontent.com/u/1203629?v=3","gravatar_id":"","url":"https://api.github.com/users/wjakob","html_url":"https://github.com/wjakob","followers_url":"https://api.github.com/users/wjakob/followers","following_url":"https://api.github.com/users/wjakob/following{/other_user}","gists_url":"https://api.github.com/users/wjakob/gists{/gist_id}","starred_url":"https://api.github.com/users/wjakob/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wjakob/subscriptions","organizations_url":"https://api.github.com/users/wjakob/orgs","repos_url":"https://api.github.com/users/wjakob/repos","events_url":"https://api.github.com/users/wjakob/events{/privacy}","received_events_url":"https://api.github.com/users/wjakob/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/wjakob/pybind11","description":"Seamless operability between C++11 and Python","fork":false,"url":"https://api.github.com/repos/wjakob/pybind11","forks_url":"https://api.github.com/repos/wjakob/pybind11/forks","keys_url":"https://api.github.com/repos/wjakob/pybind11/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wjakob/pybind11/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wjakob/pybind11/teams","hooks_url":"https://api.github.com/repos/wjakob/pybind11/hooks","issue_events_url":"https://api.github.com/repos/wjakob/pybind11/issues/events{/number}","events_url":"https://api.github.com/repos/wjakob/pybind11/events","assignees_url":"https://api.github.com/repos/wjakob/pybind11/assignees{/user}","branches_url":"https://api.github.com/repos/wjakob/pybind11/branches{/branch}","tags_url":"https://api.github.com/repos/wjakob/pybind11/tags","blobs_url":"https://api.github.com/repos/wjakob/pybind11/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wjakob/pybind11/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wjakob/pybind11/git/refs{/sha}","trees_url":"https://api.github.com/repos/wjakob/pybind11/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wjakob/pybind11/statuses/{sha}","languages_url":"https://api.github.com/repos/wjakob/pybind11/languages","stargazers_url":"https://api.github.com/repos/wjakob/pybind11/stargazers","contributors_url":"https://api.github.com/repos/wjakob/pybind11/contributors","subscribers_url":"https://api.github.com/repos/wjakob/pybind11/subscribers","subscription_url":"https://api.github.com/repos/wjakob/pybind11/subscription","commits_url":"https://api.github.com/repos/wjakob/pybind11/commits{/sha}","git_commits_url":"https://api.github.com/repos/wjakob/pybind11/git/commits{/sha}","comments_url":"https://api.github.com/repos/wjakob/pybind11/comments{/number}","issue_comment_url":"https://api.github.com/repos/wjakob/pybind11/issues/comments{/number}","contents_url":"https://api.github.com/repos/wjakob/pybind11/contents/{+path}","compare_url":"https://api.github.com/repos/wjakob/pybind11/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wjakob/pybind11/merges","archive_url":"https://api.github.com/repos/wjakob/pybind11/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wjakob/pybind11/downloads","issues_url":"https://api.github.com/repos/wjakob/pybind11/issues{/number}","pulls_url":"https://api.github.com/repos/wjakob/pybind11/pulls{/number}","milestones_url":"https://api.github.com/repos/wjakob/pybind11/milestones{/number}","notifications_url":"https://api.github.com/repos/wjakob/pybind11/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wjakob/pybind11/labels{/name}","releases_url":"https://api.github.com/repos/wjakob/pybind11/releases{/id}","created_at":"2015-07-05T19:46:48Z","updated_at":"2016-01-11T23:20:43Z","pushed_at":"2016-01-11T19:18:33Z","git_url":"git://github.com/wjakob/pybind11.git","ssh_url":"git@github.com:wjakob/pybind11.git","clone_url":"https://github.com/wjakob/pybind11.git","svn_url":"https://github.com/wjakob/pybind11","homepage":null,"size":435,"stargazers_count":853,"watchers_count":853,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":53,"mirror_url":null,"open_issues_count":14,"forks":53,"open_issues":14,"watchers":853,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/wjakob/pybind11/pulls/65"},"html":{"href":"https://github.com/wjakob/pybind11/pull/65"},"issue":{"href":"https://api.github.com/repos/wjakob/pybind11/issues/65"},"comments":{"href":"https://api.github.com/repos/wjakob/pybind11/issues/65/comments"},"review_comments":{"href":"https://api.github.com/repos/wjakob/pybind11/pulls/65/comments"},"review_comment":{"href":"https://api.github.com/repos/wjakob/pybind11/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/wjakob/pybind11/pulls/65/commits"},"statuses":{"href":"https://api.github.com/repos/wjakob/pybind11/statuses/2f97147fc7f25b63d91767cf6aa03c661e24b7e6"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":2,"deletions":2,"changed_files":1}}