{"action":"created","issue":{"url":"https://api.github.com/repos/pivotal/LicenseFinder/issues/230","repository_url":"https://api.github.com/repos/pivotal/LicenseFinder","labels_url":"https://api.github.com/repos/pivotal/LicenseFinder/issues/230/labels{/name}","comments_url":"https://api.github.com/repos/pivotal/LicenseFinder/issues/230/comments","events_url":"https://api.github.com/repos/pivotal/LicenseFinder/issues/230/events","html_url":"https://github.com/pivotal/LicenseFinder/issues/230","id":160022894,"number":230,"title":"Support for private pypi","user":{"login":"wayne-luminal","id":13006941,"avatar_url":"https://avatars.githubusercontent.com/u/13006941?v=3","gravatar_id":"","url":"https://api.github.com/users/wayne-luminal","html_url":"https://github.com/wayne-luminal","followers_url":"https://api.github.com/users/wayne-luminal/followers","following_url":"https://api.github.com/users/wayne-luminal/following{/other_user}","gists_url":"https://api.github.com/users/wayne-luminal/gists{/gist_id}","starred_url":"https://api.github.com/users/wayne-luminal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wayne-luminal/subscriptions","organizations_url":"https://api.github.com/users/wayne-luminal/orgs","repos_url":"https://api.github.com/users/wayne-luminal/repos","events_url":"https://api.github.com/users/wayne-luminal/events{/privacy}","received_events_url":"https://api.github.com/users/wayne-luminal/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-06-13T19:10:31Z","updated_at":"2016-06-20T13:35:11Z","closed_at":null,"body":"Looking at pip.rb, pypi is contacted directly for package license information. If you host your libraries on a private pypi (or anything other than pypi.python.org), your private projects will never be found. Is there an option to provide a pypi-like url?\r\n\r\nAlternatively, what do you think about using `pip show` for grabbing license information instead of pypi? The good thing about pypi is it's json and predictable but the output of `pip show` is not :/"},"comment":{"url":"https://api.github.com/repos/pivotal/LicenseFinder/issues/comments/227143392","html_url":"https://github.com/pivotal/LicenseFinder/issues/230#issuecomment-227143392","issue_url":"https://api.github.com/repos/pivotal/LicenseFinder/issues/230","id":227143392,"user":{"login":"wayne-luminal","id":13006941,"avatar_url":"https://avatars.githubusercontent.com/u/13006941?v=3","gravatar_id":"","url":"https://api.github.com/users/wayne-luminal","html_url":"https://github.com/wayne-luminal","followers_url":"https://api.github.com/users/wayne-luminal/followers","following_url":"https://api.github.com/users/wayne-luminal/following{/other_user}","gists_url":"https://api.github.com/users/wayne-luminal/gists{/gist_id}","starred_url":"https://api.github.com/users/wayne-luminal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wayne-luminal/subscriptions","organizations_url":"https://api.github.com/users/wayne-luminal/orgs","repos_url":"https://api.github.com/users/wayne-luminal/repos","events_url":"https://api.github.com/users/wayne-luminal/events{/privacy}","received_events_url":"https://api.github.com/users/wayne-luminal/received_events","type":"User","site_admin":false},"created_at":"2016-06-20T13:35:11Z","updated_at":"2016-06-20T13:35:11Z","body":"@flavorjones I forked the project and made an attempt to solve this. You can see the diff at: https://github.com/pivotal/LicenseFinder/compare/master...wayne-luminal:pip-instead-of-pypi\r\n\r\nI followed the pattern of shelling out to a python script because I don't know much about Ruby but more importantly, I can use the pip classes (I don't know if this is possible in Ruby). The script uses regex to find all the \"key: value\" pairs and create a json document out of it. For example, `License: Apache License 2.0` becomes `\"license\": \"Apache License 2.0\"` in the document. We already know using the pip classes are a little fragile (#224), so I'm not crazy about this approach, but it gets the tool away from reaching out to the network. It might be possible to use `pip show <package-name>` instead. \r\n\r\nOne note, if a value (in the key/value output of package metadata) contains a multiline string, only the first line will be retrieved. I've seen some projects where the entire contents of a license file is dumped into place rather than the title of the license itself. For an example, see v0.9.5 of github3.py. This will be fixed in the 1.0 release AFAIK but it is something to consider.\r\n\r\nThere are still tests to add which I hope to do soon. I wanted to get your initial feedback on this so far."}}
{"actor":{"display_login":"wayne-luminal"}}