{"action":"created","comment":{"url":"https://api.github.com/repos/oe-lite/python/pulls/comments/54356693","id":54356693,"diff_hunk":"@@ -0,0 +1,66 @@\n+inherit c\n+\n+COMPATIBLE_HOST_ARCHS = \".*linux\"\n+PYTHON_VERSION = \"\"\n+EXTRA_PYCONF = \"\"\n+FILES_${PN} = \"${libdir}\"\n+\n+CLASS_DEPENDS += \" \\\n+    native:python${PYTHON_VERSION} \\\n+    native:python${PYTHON_VERSION}-distutils \\\n+    native:python${PYTHON_VERSION}-modules \\\n+    python${PYTHON_VERSION}-dev \\\n+    python${PYTHON_VERSION}-modules \\\n+\"\n+\n+do_chrpath[prefuncs] += \"do_chrpath_site_packages\"\n+def do_chrpath_site_packages(d):\n+    python_version = d.get(\"PYTHON_VERSION\") or \"\"\n+    chr_paths = d.get(\"CHRPATH_DIRS\") or \"\"\n+    libdir = d.get(\"libdir\") or \"\"\n+    major_cmd = \"python{} -c 'import sys; print(sys.version_info.major)'\".format(python_version)\n+    minor_cmd = \"python{} -c 'import sys; print(sys.version_info.minor)'\".format(python_version)\n+    major = oelite.util.shcmd(major_cmd, quiet=True).strip()\n+    minor= oelite.util.shcmd(minor_cmd, quiet=True).strip()\n+    path = \" {}/python{}.{}/site-packages\".format(libdir, major, minor)\n+    chr_paths += path\n+    d.set(\"CHRPATH_DIRS\", chr_paths)\n+\n+python_setup() {\n+    export PYTHON_MAJOR=$(python${PYTHON_VERSION} -c 'import sys; print(sys.version_info.major)')\n+    export PYTHON_MINOR=$(python${PYTHON_VERSION} -c 'import sys; print(sys.version_info.minor)')\n+\n+    LIBDYNLOAD=${BUILD_SYSROOT}/lib/python$PYTHON_MAJOR.$PYTHON_MINOR/lib-dynload\n+    export PYTHONPATH=${BUILD_SYSROOT}/lib/python$PYTHON_MAJOR.$PYTHON_MINOR:$LIBDYNLOAD\n+    export PYTHONHOME=${TARGET_SYSROOT}${prefix}\n+    export LDSHARED=\"${TARGET_PREFIX}gcc -shared\"\n+}\n+\n+do_compile_python() {\n+    python_setup\n+\n+    python${PYTHON_VERSION} setup.py --no-user-cfg build_ext \\\n+        --build-lib=lib.linux-${HOST_CPU}-$PYTHON_MAJOR.$PYTHON_MINOR \\\n+        --build-temp=temp.linux-${HOST_CPU}-$PYTHON_MAJOR.$PYTHON_MINOR \\\n+        --plat-name linux-${HOST_CPU} \\\n+        --rpath=${libdir} \\\n+        ${PARALLEL_MAKE} \\\n+        ${EXTRA_PYCONF}\n+    python3 setup.py build\n+}\n+\n+do_compile() {\n+    do_compile_python\n+}\n+\n+do_install_python() {\n+    python_setup\n+\n+    python3 setup.py --no-user-cfg install \\","path":"classes/python-module.oeclass","position":59,"original_position":59,"commit_id":"9f9b40734599f5a19f7c9746358867ef1fa0f85e","original_commit_id":"9f9b40734599f5a19f7c9746358867ef1fa0f85e","user":{"login":"kimrhh","id":1851636,"avatar_url":"https://avatars.githubusercontent.com/u/1851636?v=3","gravatar_id":"","url":"https://api.github.com/users/kimrhh","html_url":"https://github.com/kimrhh","followers_url":"https://api.github.com/users/kimrhh/followers","following_url":"https://api.github.com/users/kimrhh/following{/other_user}","gists_url":"https://api.github.com/users/kimrhh/gists{/gist_id}","starred_url":"https://api.github.com/users/kimrhh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kimrhh/subscriptions","organizations_url":"https://api.github.com/users/kimrhh/orgs","repos_url":"https://api.github.com/users/kimrhh/repos","events_url":"https://api.github.com/users/kimrhh/events{/privacy}","received_events_url":"https://api.github.com/users/kimrhh/received_events","type":"User","site_admin":false},"body":"hardcoded to python3","created_at":"2016-02-28T21:30:01Z","updated_at":"2016-02-28T21:30:01Z","html_url":"https://github.com/oe-lite/python/pull/1#discussion_r54356693","pull_request_url":"https://api.github.com/repos/oe-lite/python/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/oe-lite/python/pulls/comments/54356693"},"html":{"href":"https://github.com/oe-lite/python/pull/1#discussion_r54356693"},"pull_request":{"href":"https://api.github.com/repos/oe-lite/python/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/oe-lite/python/pulls/1","id":60640776,"html_url":"https://github.com/oe-lite/python/pull/1","diff_url":"https://github.com/oe-lite/python/pull/1.diff","patch_url":"https://github.com/oe-lite/python/pull/1.patch","issue_url":"https://api.github.com/repos/oe-lite/python/issues/1","number":1,"state":"open","locked":false,"title":"Rework meta/python","user":{"login":"hundeboll","id":124832,"avatar_url":"https://avatars.githubusercontent.com/u/124832?v=3","gravatar_id":"","url":"https://api.github.com/users/hundeboll","html_url":"https://github.com/hundeboll","followers_url":"https://api.github.com/users/hundeboll/followers","following_url":"https://api.github.com/users/hundeboll/following{/other_user}","gists_url":"https://api.github.com/users/hundeboll/gists{/gist_id}","starred_url":"https://api.github.com/users/hundeboll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hundeboll/subscriptions","organizations_url":"https://api.github.com/users/hundeboll/orgs","repos_url":"https://api.github.com/users/hundeboll/repos","events_url":"https://api.github.com/users/hundeboll/events{/privacy}","received_events_url":"https://api.github.com/users/hundeboll/received_events","type":"User","site_admin":false},"body":"This is a rework of the python recipe, which supports both python2 and python3. It builds python with --enable-shared, which makes the python binary able to load native extensions (e.g. struct, socket, ctypes), and adds several fixes to make those extensions actually build.\r\n\r\nIn addition to the pyton recipe(s), a python-module class is added to ease the building of both external pure python modules, and external native extensions.","created_at":"2016-02-25T08:16:35Z","updated_at":"2016-02-28T21:30:01Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e8f004ae5be47c223d50236cf0e0eed9390c13e7","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/oe-lite/python/pulls/1/commits","review_comments_url":"https://api.github.com/repos/oe-lite/python/pulls/1/comments","review_comment_url":"https://api.github.com/repos/oe-lite/python/pulls/comments{/number}","comments_url":"https://api.github.com/repos/oe-lite/python/issues/1/comments","statuses_url":"https://api.github.com/repos/oe-lite/python/statuses/9f9b40734599f5a19f7c9746358867ef1fa0f85e","head":{"label":"hundeboll:mnhu/python","ref":"mnhu/python","sha":"9f9b40734599f5a19f7c9746358867ef1fa0f85e","user":{"login":"hundeboll","id":124832,"avatar_url":"https://avatars.githubusercontent.com/u/124832?v=3","gravatar_id":"","url":"https://api.github.com/users/hundeboll","html_url":"https://github.com/hundeboll","followers_url":"https://api.github.com/users/hundeboll/followers","following_url":"https://api.github.com/users/hundeboll/following{/other_user}","gists_url":"https://api.github.com/users/hundeboll/gists{/gist_id}","starred_url":"https://api.github.com/users/hundeboll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hundeboll/subscriptions","organizations_url":"https://api.github.com/users/hundeboll/orgs","repos_url":"https://api.github.com/users/hundeboll/repos","events_url":"https://api.github.com/users/hundeboll/events{/privacy}","received_events_url":"https://api.github.com/users/hundeboll/received_events","type":"User","site_admin":false},"repo":{"id":52507911,"name":"python","full_name":"hundeboll/python","owner":{"login":"hundeboll","id":124832,"avatar_url":"https://avatars.githubusercontent.com/u/124832?v=3","gravatar_id":"","url":"https://api.github.com/users/hundeboll","html_url":"https://github.com/hundeboll","followers_url":"https://api.github.com/users/hundeboll/followers","following_url":"https://api.github.com/users/hundeboll/following{/other_user}","gists_url":"https://api.github.com/users/hundeboll/gists{/gist_id}","starred_url":"https://api.github.com/users/hundeboll/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hundeboll/subscriptions","organizations_url":"https://api.github.com/users/hundeboll/orgs","repos_url":"https://api.github.com/users/hundeboll/repos","events_url":"https://api.github.com/users/hundeboll/events{/privacy}","received_events_url":"https://api.github.com/users/hundeboll/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hundeboll/python","description":"official meta/python repository","fork":true,"url":"https://api.github.com/repos/hundeboll/python","forks_url":"https://api.github.com/repos/hundeboll/python/forks","keys_url":"https://api.github.com/repos/hundeboll/python/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hundeboll/python/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hundeboll/python/teams","hooks_url":"https://api.github.com/repos/hundeboll/python/hooks","issue_events_url":"https://api.github.com/repos/hundeboll/python/issues/events{/number}","events_url":"https://api.github.com/repos/hundeboll/python/events","assignees_url":"https://api.github.com/repos/hundeboll/python/assignees{/user}","branches_url":"https://api.github.com/repos/hundeboll/python/branches{/branch}","tags_url":"https://api.github.com/repos/hundeboll/python/tags","blobs_url":"https://api.github.com/repos/hundeboll/python/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hundeboll/python/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hundeboll/python/git/refs{/sha}","trees_url":"https://api.github.com/repos/hundeboll/python/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hundeboll/python/statuses/{sha}","languages_url":"https://api.github.com/repos/hundeboll/python/languages","stargazers_url":"https://api.github.com/repos/hundeboll/python/stargazers","contributors_url":"https://api.github.com/repos/hundeboll/python/contributors","subscribers_url":"https://api.github.com/repos/hundeboll/python/subscribers","subscription_url":"https://api.github.com/repos/hundeboll/python/subscription","commits_url":"https://api.github.com/repos/hundeboll/python/commits{/sha}","git_commits_url":"https://api.github.com/repos/hundeboll/python/git/commits{/sha}","comments_url":"https://api.github.com/repos/hundeboll/python/comments{/number}","issue_comment_url":"https://api.github.com/repos/hundeboll/python/issues/comments{/number}","contents_url":"https://api.github.com/repos/hundeboll/python/contents/{+path}","compare_url":"https://api.github.com/repos/hundeboll/python/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hundeboll/python/merges","archive_url":"https://api.github.com/repos/hundeboll/python/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hundeboll/python/downloads","issues_url":"https://api.github.com/repos/hundeboll/python/issues{/number}","pulls_url":"https://api.github.com/repos/hundeboll/python/pulls{/number}","milestones_url":"https://api.github.com/repos/hundeboll/python/milestones{/number}","notifications_url":"https://api.github.com/repos/hundeboll/python/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hundeboll/python/labels{/name}","releases_url":"https://api.github.com/repos/hundeboll/python/releases{/id}","deployments_url":"https://api.github.com/repos/hundeboll/python/deployments","created_at":"2016-02-25T08:11:19Z","updated_at":"2016-02-25T08:11:20Z","pushed_at":"2016-02-26T18:43:18Z","git_url":"git://github.com/hundeboll/python.git","ssh_url":"git@github.com:hundeboll/python.git","clone_url":"https://github.com/hundeboll/python.git","svn_url":"https://github.com/hundeboll/python","homepage":null,"size":17,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"oe-lite:master","ref":"master","sha":"8d739ce85f96017be790daaff990445065eba727","user":{"login":"oe-lite","id":7683915,"avatar_url":"https://avatars.githubusercontent.com/u/7683915?v=3","gravatar_id":"","url":"https://api.github.com/users/oe-lite","html_url":"https://github.com/oe-lite","followers_url":"https://api.github.com/users/oe-lite/followers","following_url":"https://api.github.com/users/oe-lite/following{/other_user}","gists_url":"https://api.github.com/users/oe-lite/gists{/gist_id}","starred_url":"https://api.github.com/users/oe-lite/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oe-lite/subscriptions","organizations_url":"https://api.github.com/users/oe-lite/orgs","repos_url":"https://api.github.com/users/oe-lite/repos","events_url":"https://api.github.com/users/oe-lite/events{/privacy}","received_events_url":"https://api.github.com/users/oe-lite/received_events","type":"Organization","site_admin":false},"repo":{"id":28853286,"name":"python","full_name":"oe-lite/python","owner":{"login":"oe-lite","id":7683915,"avatar_url":"https://avatars.githubusercontent.com/u/7683915?v=3","gravatar_id":"","url":"https://api.github.com/users/oe-lite","html_url":"https://github.com/oe-lite","followers_url":"https://api.github.com/users/oe-lite/followers","following_url":"https://api.github.com/users/oe-lite/following{/other_user}","gists_url":"https://api.github.com/users/oe-lite/gists{/gist_id}","starred_url":"https://api.github.com/users/oe-lite/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oe-lite/subscriptions","organizations_url":"https://api.github.com/users/oe-lite/orgs","repos_url":"https://api.github.com/users/oe-lite/repos","events_url":"https://api.github.com/users/oe-lite/events{/privacy}","received_events_url":"https://api.github.com/users/oe-lite/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/oe-lite/python","description":"Official OE-lite/Python repository","fork":false,"url":"https://api.github.com/repos/oe-lite/python","forks_url":"https://api.github.com/repos/oe-lite/python/forks","keys_url":"https://api.github.com/repos/oe-lite/python/keys{/key_id}","collaborators_url":"https://api.github.com/repos/oe-lite/python/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/oe-lite/python/teams","hooks_url":"https://api.github.com/repos/oe-lite/python/hooks","issue_events_url":"https://api.github.com/repos/oe-lite/python/issues/events{/number}","events_url":"https://api.github.com/repos/oe-lite/python/events","assignees_url":"https://api.github.com/repos/oe-lite/python/assignees{/user}","branches_url":"https://api.github.com/repos/oe-lite/python/branches{/branch}","tags_url":"https://api.github.com/repos/oe-lite/python/tags","blobs_url":"https://api.github.com/repos/oe-lite/python/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/oe-lite/python/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/oe-lite/python/git/refs{/sha}","trees_url":"https://api.github.com/repos/oe-lite/python/git/trees{/sha}","statuses_url":"https://api.github.com/repos/oe-lite/python/statuses/{sha}","languages_url":"https://api.github.com/repos/oe-lite/python/languages","stargazers_url":"https://api.github.com/repos/oe-lite/python/stargazers","contributors_url":"https://api.github.com/repos/oe-lite/python/contributors","subscribers_url":"https://api.github.com/repos/oe-lite/python/subscribers","subscription_url":"https://api.github.com/repos/oe-lite/python/subscription","commits_url":"https://api.github.com/repos/oe-lite/python/commits{/sha}","git_commits_url":"https://api.github.com/repos/oe-lite/python/git/commits{/sha}","comments_url":"https://api.github.com/repos/oe-lite/python/comments{/number}","issue_comment_url":"https://api.github.com/repos/oe-lite/python/issues/comments{/number}","contents_url":"https://api.github.com/repos/oe-lite/python/contents/{+path}","compare_url":"https://api.github.com/repos/oe-lite/python/compare/{base}...{head}","merges_url":"https://api.github.com/repos/oe-lite/python/merges","archive_url":"https://api.github.com/repos/oe-lite/python/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/oe-lite/python/downloads","issues_url":"https://api.github.com/repos/oe-lite/python/issues{/number}","pulls_url":"https://api.github.com/repos/oe-lite/python/pulls{/number}","milestones_url":"https://api.github.com/repos/oe-lite/python/milestones{/number}","notifications_url":"https://api.github.com/repos/oe-lite/python/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/oe-lite/python/labels{/name}","releases_url":"https://api.github.com/repos/oe-lite/python/releases{/id}","deployments_url":"https://api.github.com/repos/oe-lite/python/deployments","created_at":"2015-01-06T08:07:28Z","updated_at":"2016-02-27T10:59:47Z","pushed_at":"2016-02-26T18:43:18Z","git_url":"git://github.com/oe-lite/python.git","ssh_url":"git@github.com:oe-lite/python.git","clone_url":"https://github.com/oe-lite/python.git","svn_url":"https://github.com/oe-lite/python","homepage":"","size":100,"stargazers_count":1,"watchers_count":1,"language":"Standard ML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/oe-lite/python/pulls/1"},"html":{"href":"https://github.com/oe-lite/python/pull/1"},"issue":{"href":"https://api.github.com/repos/oe-lite/python/issues/1"},"comments":{"href":"https://api.github.com/repos/oe-lite/python/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/oe-lite/python/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/oe-lite/python/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/oe-lite/python/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/oe-lite/python/statuses/9f9b40734599f5a19f7c9746358867ef1fa0f85e"}}}}