{"action":"created","comment":{"url":"https://api.github.com/repos/buildout/buildout/pulls/comments/42013886","id":42013886,"diff_hunk":"@@ -882,6 +883,45 @@ def _copyeggs(src, dest, suffix, undo):\n \n     return result[0]\n \n+\n+_develop_distutils_scripts = {}\n+\n+\n+def _detect_distutils_scripts(directory):\n+    \"\"\"Record detected distutils scripts from develop eggs\n+\n+    ``setup.py develop`` doesn't generate metadata on distutils scripts, in\n+    contrast to ``setup.py install``. So we have to store the information for\n+    later.\n+\n+    \"\"\"\n+    dir_contents = os.listdir(directory)\n+    egginfo_filenames = [filename for filename in dir_contents\n+                         if filename.endswith('.egg-link')]\n+    if not egginfo_filenames:\n+        return\n+    egg_name = egginfo_filenames[0].replace('.egg-link', '')\n+    marker = 'EASY-INSTALL-DEV-SCRIPT'\n+    scripts_found = []\n+    for filename in dir_contents:\n+        dev_script_content = open(os.path.join(directory, filename)).read()\n+        if marker in dev_script_content:\n+            # The distutils bin script points at the actual file we need.\n+            for line in dev_script_content.splitlines():\n+                match = DUNDER_FILE_PATTERN.search(line)\n+                if match:\n+                    actual_script_filename = match.group('filename')\n+                    actual_script_content = open(\n+                        actual_script_filename).read()","path":"src/zc/buildout/easy_install.py","position":57,"original_position":57,"commit_id":"999057b18675f24e8f8592ec12c63ad78e024fd2","original_commit_id":"999057b18675f24e8f8592ec12c63ad78e024fd2","user":{"login":"mgedmin","id":159967,"avatar_url":"https://avatars.githubusercontent.com/u/159967?v=3","gravatar_id":"","url":"https://api.github.com/users/mgedmin","html_url":"https://github.com/mgedmin","followers_url":"https://api.github.com/users/mgedmin/followers","following_url":"https://api.github.com/users/mgedmin/following{/other_user}","gists_url":"https://api.github.com/users/mgedmin/gists{/gist_id}","starred_url":"https://api.github.com/users/mgedmin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mgedmin/subscriptions","organizations_url":"https://api.github.com/users/mgedmin/orgs","repos_url":"https://api.github.com/users/mgedmin/repos","events_url":"https://api.github.com/users/mgedmin/events{/privacy}","received_events_url":"https://api.github.com/users/mgedmin/received_events","type":"User","site_admin":false},"body":"with open()...","created_at":"2015-10-14T16:04:07Z","updated_at":"2015-10-14T16:04:07Z","html_url":"https://github.com/buildout/buildout/pull/273#discussion_r42013886","pull_request_url":"https://api.github.com/repos/buildout/buildout/pulls/273","_links":{"self":{"href":"https://api.github.com/repos/buildout/buildout/pulls/comments/42013886"},"html":{"href":"https://github.com/buildout/buildout/pull/273#discussion_r42013886"},"pull_request":{"href":"https://api.github.com/repos/buildout/buildout/pulls/273"}}},"pull_request":{"url":"https://api.github.com/repos/buildout/buildout/pulls/273","id":47649173,"html_url":"https://github.com/buildout/buildout/pull/273","diff_url":"https://github.com/buildout/buildout/pull/273.diff","patch_url":"https://github.com/buildout/buildout/pull/273.patch","issue_url":"https://api.github.com/repos/buildout/buildout/issues/273","number":273,"state":"open","locked":false,"title":"distutils scripts for develoment eggs are also installed","user":{"login":"reinout","id":121433,"avatar_url":"https://avatars.githubusercontent.com/u/121433?v=3","gravatar_id":"","url":"https://api.github.com/users/reinout","html_url":"https://github.com/reinout","followers_url":"https://api.github.com/users/reinout/followers","following_url":"https://api.github.com/users/reinout/following{/other_user}","gists_url":"https://api.github.com/users/reinout/gists{/gist_id}","starred_url":"https://api.github.com/users/reinout/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reinout/subscriptions","organizations_url":"https://api.github.com/users/reinout/orgs","repos_url":"https://api.github.com/users/reinout/repos","events_url":"https://api.github.com/users/reinout/events{/privacy}","received_events_url":"https://api.github.com/users/reinout/received_events","type":"User","site_admin":false},"body":"See the last half of #24. Eggs installed as develop eggs or via mr.developer dont' get their distutils scripts generated. Now they do.\r\n\r\nMain problem: `setup.py develop` doesn't record metadata on those scripts, so we have to keep track of them ourselves. Sadly, I seem to have to do it in a module-level variable. The \"tompoes\" testcase-example from the #24 works with this change. And there's a test case.","created_at":"2015-10-14T11:53:09Z","updated_at":"2015-10-14T16:04:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"becc633bd3c61e766a0887245a7762130434323a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/buildout/buildout/pulls/273/commits","review_comments_url":"https://api.github.com/repos/buildout/buildout/pulls/273/comments","review_comment_url":"https://api.github.com/repos/buildout/buildout/pulls/comments{/number}","comments_url":"https://api.github.com/repos/buildout/buildout/issues/273/comments","statuses_url":"https://api.github.com/repos/buildout/buildout/statuses/999057b18675f24e8f8592ec12c63ad78e024fd2","head":{"label":"buildout:reinout-develop-distutils-scripts","ref":"reinout-develop-distutils-scripts","sha":"999057b18675f24e8f8592ec12c63ad78e024fd2","user":{"login":"buildout","id":1574305,"avatar_url":"https://avatars.githubusercontent.com/u/1574305?v=3","gravatar_id":"","url":"https://api.github.com/users/buildout","html_url":"https://github.com/buildout","followers_url":"https://api.github.com/users/buildout/followers","following_url":"https://api.github.com/users/buildout/following{/other_user}","gists_url":"https://api.github.com/users/buildout/gists{/gist_id}","starred_url":"https://api.github.com/users/buildout/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/buildout/subscriptions","organizations_url":"https://api.github.com/users/buildout/orgs","repos_url":"https://api.github.com/users/buildout/repos","events_url":"https://api.github.com/users/buildout/events{/privacy}","received_events_url":"https://api.github.com/users/buildout/received_events","type":"Organization","site_admin":false},"repo":{"id":3827595,"name":"buildout","full_name":"buildout/buildout","owner":{"login":"buildout","id":1574305,"avatar_url":"https://avatars.githubusercontent.com/u/1574305?v=3","gravatar_id":"","url":"https://api.github.com/users/buildout","html_url":"https://github.com/buildout","followers_url":"https://api.github.com/users/buildout/followers","following_url":"https://api.github.com/users/buildout/following{/other_user}","gists_url":"https://api.github.com/users/buildout/gists{/gist_id}","starred_url":"https://api.github.com/users/buildout/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/buildout/subscriptions","organizations_url":"https://api.github.com/users/buildout/orgs","repos_url":"https://api.github.com/users/buildout/repos","events_url":"https://api.github.com/users/buildout/events{/privacy}","received_events_url":"https://api.github.com/users/buildout/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/buildout/buildout","description":"","fork":false,"url":"https://api.github.com/repos/buildout/buildout","forks_url":"https://api.github.com/repos/buildout/buildout/forks","keys_url":"https://api.github.com/repos/buildout/buildout/keys{/key_id}","collaborators_url":"https://api.github.com/repos/buildout/buildout/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/buildout/buildout/teams","hooks_url":"https://api.github.com/repos/buildout/buildout/hooks","issue_events_url":"https://api.github.com/repos/buildout/buildout/issues/events{/number}","events_url":"https://api.github.com/repos/buildout/buildout/events","assignees_url":"https://api.github.com/repos/buildout/buildout/assignees{/user}","branches_url":"https://api.github.com/repos/buildout/buildout/branches{/branch}","tags_url":"https://api.github.com/repos/buildout/buildout/tags","blobs_url":"https://api.github.com/repos/buildout/buildout/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/buildout/buildout/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/buildout/buildout/git/refs{/sha}","trees_url":"https://api.github.com/repos/buildout/buildout/git/trees{/sha}","statuses_url":"https://api.github.com/repos/buildout/buildout/statuses/{sha}","languages_url":"https://api.github.com/repos/buildout/buildout/languages","stargazers_url":"https://api.github.com/repos/buildout/buildout/stargazers","contributors_url":"https://api.github.com/repos/buildout/buildout/contributors","subscribers_url":"https://api.github.com/repos/buildout/buildout/subscribers","subscription_url":"https://api.github.com/repos/buildout/buildout/subscription","commits_url":"https://api.github.com/repos/buildout/buildout/commits{/sha}","git_commits_url":"https://api.github.com/repos/buildout/buildout/git/commits{/sha}","comments_url":"https://api.github.com/repos/buildout/buildout/comments{/number}","issue_comment_url":"https://api.github.com/repos/buildout/buildout/issues/comments{/number}","contents_url":"https://api.github.com/repos/buildout/buildout/contents/{+path}","compare_url":"https://api.github.com/repos/buildout/buildout/compare/{base}...{head}","merges_url":"https://api.github.com/repos/buildout/buildout/merges","archive_url":"https://api.github.com/repos/buildout/buildout/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/buildout/buildout/downloads","issues_url":"https://api.github.com/repos/buildout/buildout/issues{/number}","pulls_url":"https://api.github.com/repos/buildout/buildout/pulls{/number}","milestones_url":"https://api.github.com/repos/buildout/buildout/milestones{/number}","notifications_url":"https://api.github.com/repos/buildout/buildout/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/buildout/buildout/labels{/name}","releases_url":"https://api.github.com/repos/buildout/buildout/releases{/id}","created_at":"2012-03-25T21:47:18Z","updated_at":"2015-09-30T09:35:47Z","pushed_at":"2015-10-14T12:17:30Z","git_url":"git://github.com/buildout/buildout.git","ssh_url":"git@github.com:buildout/buildout.git","clone_url":"https://github.com/buildout/buildout.git","svn_url":"https://github.com/buildout/buildout","homepage":"www.buildout.org","size":6210,"stargazers_count":200,"watchers_count":200,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":100,"mirror_url":null,"open_issues_count":76,"forks":100,"open_issues":76,"watchers":200,"default_branch":"master"}},"base":{"label":"buildout:master","ref":"master","sha":"94d0b070ac941061f16b106d74506a9b8972a0a1","user":{"login":"buildout","id":1574305,"avatar_url":"https://avatars.githubusercontent.com/u/1574305?v=3","gravatar_id":"","url":"https://api.github.com/users/buildout","html_url":"https://github.com/buildout","followers_url":"https://api.github.com/users/buildout/followers","following_url":"https://api.github.com/users/buildout/following{/other_user}","gists_url":"https://api.github.com/users/buildout/gists{/gist_id}","starred_url":"https://api.github.com/users/buildout/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/buildout/subscriptions","organizations_url":"https://api.github.com/users/buildout/orgs","repos_url":"https://api.github.com/users/buildout/repos","events_url":"https://api.github.com/users/buildout/events{/privacy}","received_events_url":"https://api.github.com/users/buildout/received_events","type":"Organization","site_admin":false},"repo":{"id":3827595,"name":"buildout","full_name":"buildout/buildout","owner":{"login":"buildout","id":1574305,"avatar_url":"https://avatars.githubusercontent.com/u/1574305?v=3","gravatar_id":"","url":"https://api.github.com/users/buildout","html_url":"https://github.com/buildout","followers_url":"https://api.github.com/users/buildout/followers","following_url":"https://api.github.com/users/buildout/following{/other_user}","gists_url":"https://api.github.com/users/buildout/gists{/gist_id}","starred_url":"https://api.github.com/users/buildout/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/buildout/subscriptions","organizations_url":"https://api.github.com/users/buildout/orgs","repos_url":"https://api.github.com/users/buildout/repos","events_url":"https://api.github.com/users/buildout/events{/privacy}","received_events_url":"https://api.github.com/users/buildout/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/buildout/buildout","description":"","fork":false,"url":"https://api.github.com/repos/buildout/buildout","forks_url":"https://api.github.com/repos/buildout/buildout/forks","keys_url":"https://api.github.com/repos/buildout/buildout/keys{/key_id}","collaborators_url":"https://api.github.com/repos/buildout/buildout/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/buildout/buildout/teams","hooks_url":"https://api.github.com/repos/buildout/buildout/hooks","issue_events_url":"https://api.github.com/repos/buildout/buildout/issues/events{/number}","events_url":"https://api.github.com/repos/buildout/buildout/events","assignees_url":"https://api.github.com/repos/buildout/buildout/assignees{/user}","branches_url":"https://api.github.com/repos/buildout/buildout/branches{/branch}","tags_url":"https://api.github.com/repos/buildout/buildout/tags","blobs_url":"https://api.github.com/repos/buildout/buildout/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/buildout/buildout/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/buildout/buildout/git/refs{/sha}","trees_url":"https://api.github.com/repos/buildout/buildout/git/trees{/sha}","statuses_url":"https://api.github.com/repos/buildout/buildout/statuses/{sha}","languages_url":"https://api.github.com/repos/buildout/buildout/languages","stargazers_url":"https://api.github.com/repos/buildout/buildout/stargazers","contributors_url":"https://api.github.com/repos/buildout/buildout/contributors","subscribers_url":"https://api.github.com/repos/buildout/buildout/subscribers","subscription_url":"https://api.github.com/repos/buildout/buildout/subscription","commits_url":"https://api.github.com/repos/buildout/buildout/commits{/sha}","git_commits_url":"https://api.github.com/repos/buildout/buildout/git/commits{/sha}","comments_url":"https://api.github.com/repos/buildout/buildout/comments{/number}","issue_comment_url":"https://api.github.com/repos/buildout/buildout/issues/comments{/number}","contents_url":"https://api.github.com/repos/buildout/buildout/contents/{+path}","compare_url":"https://api.github.com/repos/buildout/buildout/compare/{base}...{head}","merges_url":"https://api.github.com/repos/buildout/buildout/merges","archive_url":"https://api.github.com/repos/buildout/buildout/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/buildout/buildout/downloads","issues_url":"https://api.github.com/repos/buildout/buildout/issues{/number}","pulls_url":"https://api.github.com/repos/buildout/buildout/pulls{/number}","milestones_url":"https://api.github.com/repos/buildout/buildout/milestones{/number}","notifications_url":"https://api.github.com/repos/buildout/buildout/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/buildout/buildout/labels{/name}","releases_url":"https://api.github.com/repos/buildout/buildout/releases{/id}","created_at":"2012-03-25T21:47:18Z","updated_at":"2015-09-30T09:35:47Z","pushed_at":"2015-10-14T12:17:30Z","git_url":"git://github.com/buildout/buildout.git","ssh_url":"git@github.com:buildout/buildout.git","clone_url":"https://github.com/buildout/buildout.git","svn_url":"https://github.com/buildout/buildout","homepage":"www.buildout.org","size":6210,"stargazers_count":200,"watchers_count":200,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":100,"mirror_url":null,"open_issues_count":76,"forks":100,"open_issues":76,"watchers":200,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/buildout/buildout/pulls/273"},"html":{"href":"https://github.com/buildout/buildout/pull/273"},"issue":{"href":"https://api.github.com/repos/buildout/buildout/issues/273"},"comments":{"href":"https://api.github.com/repos/buildout/buildout/issues/273/comments"},"review_comments":{"href":"https://api.github.com/repos/buildout/buildout/pulls/273/comments"},"review_comment":{"href":"https://api.github.com/repos/buildout/buildout/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/buildout/buildout/pulls/273/commits"},"statuses":{"href":"https://api.github.com/repos/buildout/buildout/statuses/999057b18675f24e8f8592ec12c63ad78e024fd2"}}}}