{"action":"opened","number":3,"pull_request":{"url":"https://api.github.com/repos/dgrunwald/rust-cpython/pulls/3","id":35586458,"html_url":"https://github.com/dgrunwald/rust-cpython/pull/3","diff_url":"https://github.com/dgrunwald/rust-cpython/pull/3.diff","patch_url":"https://github.com/dgrunwald/rust-cpython/pull/3.patch","issue_url":"https://api.github.com/repos/dgrunwald/rust-cpython/issues/3","number":3,"state":"open","locked":false,"title":"fix issues in bb13ec, support utf16, python fom PATH","user":{"login":"novocaine","id":57377,"avatar_url":"https://avatars.githubusercontent.com/u/57377?v=3","gravatar_id":"","url":"https://api.github.com/users/novocaine","html_url":"https://github.com/novocaine","followers_url":"https://api.github.com/users/novocaine/followers","following_url":"https://api.github.com/users/novocaine/following{/other_user}","gists_url":"https://api.github.com/users/novocaine/gists{/gist_id}","starred_url":"https://api.github.com/users/novocaine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/novocaine/subscriptions","organizations_url":"https://api.github.com/users/novocaine/orgs","repos_url":"https://api.github.com/users/novocaine/repos","events_url":"https://api.github.com/users/novocaine/events{/privacy}","received_events_url":"https://api.github.com/users/novocaine/received_events","type":"User","site_admin":false},"body":"* fix ucs4 build broken by bb13ec\r\n* add utf16 decoding to unicode.from_py_object for\r\n  narrow unicode builds\r\n* change unicode narrow/wide cfg flag to be\r\n  Py_UNICODE_SIZE_4 not Py_UNICODE_WIDE, which doesn't\r\n  appear in sysconfig\r\n* support framework builds on os x\r\n* python27-sys exports compilation flags as cargo vars,\r\n  and rust-python resurrects them as cfg flags\r\n* travis runs against local python27-sys\r\n* rust-cpython depends on git python27-sys, because\r\n  the one on cargo is now incompatible with it (since bb13ec)\r\n\r\nOkay, so things were a little complicated than I previous thought :/\r\n\r\n1. The CI was actually running off crates.io's python27-sys, so I didn't realise I had a bunch of things wrong and had actually broken the build - sorry :/. I am still learning about the rust build system. \r\n\r\nIn this commit, I've altered the travis.yml to force tests to run against a local python27-sys. Maybe there's a better way than this? But I think the CI needs to fully reflect the code in the repo to avoid this happening again.\r\n\r\n2. --cfg flags don't actually propagate to dependent crates, there's a separate system for exporting vars in cargo. So previously rust-python wasn't seeing cfg flags it needed in order to compile, and was broken. python27-sys now exports the python flags, and rust-python picks them up and resurrects them as the same cfg flags - so we can still use identical syntax in the two packages.\r\n\r\n3. Fixed utf-16 decoding, added explicit os x fixes, and can now run off the python in your PATH, which works great with virtualenv and is how I managed to flip between testing against wide/narrow python builds.\r\n\r\nIf you like, I'm happy to split this into the commits which fix stuff I broke, and the commits which add new features for os x/utf16.\r\n\r\n","created_at":"2015-05-17T12:38:00Z","updated_at":"2015-05-17T12:38:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dgrunwald/rust-cpython/pulls/3/commits","review_comments_url":"https://api.github.com/repos/dgrunwald/rust-cpython/pulls/3/comments","review_comment_url":"https://api.github.com/repos/dgrunwald/rust-cpython/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dgrunwald/rust-cpython/issues/3/comments","statuses_url":"https://api.github.com/repos/dgrunwald/rust-cpython/statuses/b3e20e900bc981628244a9548e265dee2a367490","head":{"label":"novocaine:master","ref":"master","sha":"b3e20e900bc981628244a9548e265dee2a367490","user":{"login":"novocaine","id":57377,"avatar_url":"https://avatars.githubusercontent.com/u/57377?v=3","gravatar_id":"","url":"https://api.github.com/users/novocaine","html_url":"https://github.com/novocaine","followers_url":"https://api.github.com/users/novocaine/followers","following_url":"https://api.github.com/users/novocaine/following{/other_user}","gists_url":"https://api.github.com/users/novocaine/gists{/gist_id}","starred_url":"https://api.github.com/users/novocaine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/novocaine/subscriptions","organizations_url":"https://api.github.com/users/novocaine/orgs","repos_url":"https://api.github.com/users/novocaine/repos","events_url":"https://api.github.com/users/novocaine/events{/privacy}","received_events_url":"https://api.github.com/users/novocaine/received_events","type":"User","site_admin":false},"repo":{"id":35335093,"name":"rust-cpython","full_name":"novocaine/rust-cpython","owner":{"login":"novocaine","id":57377,"avatar_url":"https://avatars.githubusercontent.com/u/57377?v=3","gravatar_id":"","url":"https://api.github.com/users/novocaine","html_url":"https://github.com/novocaine","followers_url":"https://api.github.com/users/novocaine/followers","following_url":"https://api.github.com/users/novocaine/following{/other_user}","gists_url":"https://api.github.com/users/novocaine/gists{/gist_id}","starred_url":"https://api.github.com/users/novocaine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/novocaine/subscriptions","organizations_url":"https://api.github.com/users/novocaine/orgs","repos_url":"https://api.github.com/users/novocaine/repos","events_url":"https://api.github.com/users/novocaine/events{/privacy}","received_events_url":"https://api.github.com/users/novocaine/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/novocaine/rust-cpython","description":"Rust <-> Python bindings","fork":true,"url":"https://api.github.com/repos/novocaine/rust-cpython","forks_url":"https://api.github.com/repos/novocaine/rust-cpython/forks","keys_url":"https://api.github.com/repos/novocaine/rust-cpython/keys{/key_id}","collaborators_url":"https://api.github.com/repos/novocaine/rust-cpython/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/novocaine/rust-cpython/teams","hooks_url":"https://api.github.com/repos/novocaine/rust-cpython/hooks","issue_events_url":"https://api.github.com/repos/novocaine/rust-cpython/issues/events{/number}","events_url":"https://api.github.com/repos/novocaine/rust-cpython/events","assignees_url":"https://api.github.com/repos/novocaine/rust-cpython/assignees{/user}","branches_url":"https://api.github.com/repos/novocaine/rust-cpython/branches{/branch}","tags_url":"https://api.github.com/repos/novocaine/rust-cpython/tags","blobs_url":"https://api.github.com/repos/novocaine/rust-cpython/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/novocaine/rust-cpython/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/novocaine/rust-cpython/git/refs{/sha}","trees_url":"https://api.github.com/repos/novocaine/rust-cpython/git/trees{/sha}","statuses_url":"https://api.github.com/repos/novocaine/rust-cpython/statuses/{sha}","languages_url":"https://api.github.com/repos/novocaine/rust-cpython/languages","stargazers_url":"https://api.github.com/repos/novocaine/rust-cpython/stargazers","contributors_url":"https://api.github.com/repos/novocaine/rust-cpython/contributors","subscribers_url":"https://api.github.com/repos/novocaine/rust-cpython/subscribers","subscription_url":"https://api.github.com/repos/novocaine/rust-cpython/subscription","commits_url":"https://api.github.com/repos/novocaine/rust-cpython/commits{/sha}","git_commits_url":"https://api.github.com/repos/novocaine/rust-cpython/git/commits{/sha}","comments_url":"https://api.github.com/repos/novocaine/rust-cpython/comments{/number}","issue_comment_url":"https://api.github.com/repos/novocaine/rust-cpython/issues/comments{/number}","contents_url":"https://api.github.com/repos/novocaine/rust-cpython/contents/{+path}","compare_url":"https://api.github.com/repos/novocaine/rust-cpython/compare/{base}...{head}","merges_url":"https://api.github.com/repos/novocaine/rust-cpython/merges","archive_url":"https://api.github.com/repos/novocaine/rust-cpython/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/novocaine/rust-cpython/downloads","issues_url":"https://api.github.com/repos/novocaine/rust-cpython/issues{/number}","pulls_url":"https://api.github.com/repos/novocaine/rust-cpython/pulls{/number}","milestones_url":"https://api.github.com/repos/novocaine/rust-cpython/milestones{/number}","notifications_url":"https://api.github.com/repos/novocaine/rust-cpython/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/novocaine/rust-cpython/labels{/name}","releases_url":"https://api.github.com/repos/novocaine/rust-cpython/releases{/id}","created_at":"2015-05-09T16:07:05Z","updated_at":"2015-05-09T16:07:06Z","pushed_at":"2015-05-17T12:22:19Z","git_url":"git://github.com/novocaine/rust-cpython.git","ssh_url":"git@github.com:novocaine/rust-cpython.git","clone_url":"https://github.com/novocaine/rust-cpython.git","svn_url":"https://github.com/novocaine/rust-cpython","homepage":null,"size":996,"stargazers_count":0,"watchers_count":0,"language":"Rust","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"dgrunwald:master","ref":"master","sha":"bb13ecd610ad08c300f3bdb5c1df4ad539dde383","user":{"login":"dgrunwald","id":243140,"avatar_url":"https://avatars.githubusercontent.com/u/243140?v=3","gravatar_id":"","url":"https://api.github.com/users/dgrunwald","html_url":"https://github.com/dgrunwald","followers_url":"https://api.github.com/users/dgrunwald/followers","following_url":"https://api.github.com/users/dgrunwald/following{/other_user}","gists_url":"https://api.github.com/users/dgrunwald/gists{/gist_id}","starred_url":"https://api.github.com/users/dgrunwald/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dgrunwald/subscriptions","organizations_url":"https://api.github.com/users/dgrunwald/orgs","repos_url":"https://api.github.com/users/dgrunwald/repos","events_url":"https://api.github.com/users/dgrunwald/events{/privacy}","received_events_url":"https://api.github.com/users/dgrunwald/received_events","type":"User","site_admin":false},"repo":{"id":28820369,"name":"rust-cpython","full_name":"dgrunwald/rust-cpython","owner":{"login":"dgrunwald","id":243140,"avatar_url":"https://avatars.githubusercontent.com/u/243140?v=3","gravatar_id":"","url":"https://api.github.com/users/dgrunwald","html_url":"https://github.com/dgrunwald","followers_url":"https://api.github.com/users/dgrunwald/followers","following_url":"https://api.github.com/users/dgrunwald/following{/other_user}","gists_url":"https://api.github.com/users/dgrunwald/gists{/gist_id}","starred_url":"https://api.github.com/users/dgrunwald/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dgrunwald/subscriptions","organizations_url":"https://api.github.com/users/dgrunwald/orgs","repos_url":"https://api.github.com/users/dgrunwald/repos","events_url":"https://api.github.com/users/dgrunwald/events{/privacy}","received_events_url":"https://api.github.com/users/dgrunwald/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dgrunwald/rust-cpython","description":"Rust <-> Python bindings","fork":false,"url":"https://api.github.com/repos/dgrunwald/rust-cpython","forks_url":"https://api.github.com/repos/dgrunwald/rust-cpython/forks","keys_url":"https://api.github.com/repos/dgrunwald/rust-cpython/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dgrunwald/rust-cpython/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dgrunwald/rust-cpython/teams","hooks_url":"https://api.github.com/repos/dgrunwald/rust-cpython/hooks","issue_events_url":"https://api.github.com/repos/dgrunwald/rust-cpython/issues/events{/number}","events_url":"https://api.github.com/repos/dgrunwald/rust-cpython/events","assignees_url":"https://api.github.com/repos/dgrunwald/rust-cpython/assignees{/user}","branches_url":"https://api.github.com/repos/dgrunwald/rust-cpython/branches{/branch}","tags_url":"https://api.github.com/repos/dgrunwald/rust-cpython/tags","blobs_url":"https://api.github.com/repos/dgrunwald/rust-cpython/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dgrunwald/rust-cpython/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dgrunwald/rust-cpython/git/refs{/sha}","trees_url":"https://api.github.com/repos/dgrunwald/rust-cpython/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dgrunwald/rust-cpython/statuses/{sha}","languages_url":"https://api.github.com/repos/dgrunwald/rust-cpython/languages","stargazers_url":"https://api.github.com/repos/dgrunwald/rust-cpython/stargazers","contributors_url":"https://api.github.com/repos/dgrunwald/rust-cpython/contributors","subscribers_url":"https://api.github.com/repos/dgrunwald/rust-cpython/subscribers","subscription_url":"https://api.github.com/repos/dgrunwald/rust-cpython/subscription","commits_url":"https://api.github.com/repos/dgrunwald/rust-cpython/commits{/sha}","git_commits_url":"https://api.github.com/repos/dgrunwald/rust-cpython/git/commits{/sha}","comments_url":"https://api.github.com/repos/dgrunwald/rust-cpython/comments{/number}","issue_comment_url":"https://api.github.com/repos/dgrunwald/rust-cpython/issues/comments{/number}","contents_url":"https://api.github.com/repos/dgrunwald/rust-cpython/contents/{+path}","compare_url":"https://api.github.com/repos/dgrunwald/rust-cpython/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dgrunwald/rust-cpython/merges","archive_url":"https://api.github.com/repos/dgrunwald/rust-cpython/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dgrunwald/rust-cpython/downloads","issues_url":"https://api.github.com/repos/dgrunwald/rust-cpython/issues{/number}","pulls_url":"https://api.github.com/repos/dgrunwald/rust-cpython/pulls{/number}","milestones_url":"https://api.github.com/repos/dgrunwald/rust-cpython/milestones{/number}","notifications_url":"https://api.github.com/repos/dgrunwald/rust-cpython/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dgrunwald/rust-cpython/labels{/name}","releases_url":"https://api.github.com/repos/dgrunwald/rust-cpython/releases{/id}","created_at":"2015-01-05T16:14:46Z","updated_at":"2015-05-17T09:06:49Z","pushed_at":"2015-05-13T19:22:52Z","git_url":"git://github.com/dgrunwald/rust-cpython.git","ssh_url":"git@github.com:dgrunwald/rust-cpython.git","clone_url":"https://github.com/dgrunwald/rust-cpython.git","svn_url":"https://github.com/dgrunwald/rust-cpython","homepage":null,"size":1200,"stargazers_count":15,"watchers_count":15,"language":"Rust","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2,"mirror_url":null,"open_issues_count":1,"forks":2,"open_issues":1,"watchers":15,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dgrunwald/rust-cpython/pulls/3"},"html":{"href":"https://github.com/dgrunwald/rust-cpython/pull/3"},"issue":{"href":"https://api.github.com/repos/dgrunwald/rust-cpython/issues/3"},"comments":{"href":"https://api.github.com/repos/dgrunwald/rust-cpython/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/dgrunwald/rust-cpython/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/dgrunwald/rust-cpython/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dgrunwald/rust-cpython/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/dgrunwald/rust-cpython/statuses/b3e20e900bc981628244a9548e265dee2a367490"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":229,"deletions":43,"changed_files":8}}