{"action":"created","comment":{"url":"https://api.github.com/repos/BobBuildTool/bob/pulls/comments/81329424","pull_request_review_id":2317048,"id":81329424,"diff_hunk":"@@ -906,6 +907,97 @@ def doDevelop(argv, bobRoot):\n     parser = argparse.ArgumentParser(prog=\"bob dev\", description='Build packages in development mode.')\n     commonBuildDevelop(parser, argv, bobRoot, True)\n \n+def doProject(argv, bobRoot):\n+    parser = argparse.ArgumentParser(prog=\"bob project\", description='Generate Project Files')\n+    parser.add_argument('projectGenerator', nargs='?', help=\"Generator to use.\")\n+    parser.add_argument('package', nargs='?', help=\"Sub-package that is the root of the project\")\n+    parser.add_argument('args', nargs=argparse.REMAINDER,\n+                        help=\"Arguments for project generator\")\n+\n+    parser.add_argument('--list', default=False, action='store_true', help=\"List available Generators\")\n+    parser.add_argument('-D', default=[], action='append', dest=\"defines\",\n+        help=\"Override default environment variable\")\n+    parser.add_argument('-c', dest=\"configFile\", default=[], action='append',\n+        help=\"Use config File\")\n+    parser.add_argument('-e', dest=\"white_list\", default=[], action='append', metavar=\"NAME\",\n+        help=\"Preserve environment variable\")\n+    parser.add_argument('-E', dest=\"preserve_env\", default=False, action='store_true',\n+        help=\"Preserve whole environment\")\n+    parser.add_argument('-n', dest=\"execute_prebuild\", default=True, action='store_false',\n+        help=\"Do not build (bob dev) before generate project Files. RunTargets may not work\")\n+    args = parser.parse_args(argv)\n+\n+    defines = {}\n+    for define in args.defines:\n+        d = define.split(\"=\")\n+        if len(d) == 1:\n+            defines[d[0]] = \"\"\n+        elif len(d) == 2:\n+            defines[d[0]] = d[1]\n+        else:\n+            parser.error(\"Malformed define: \"+define)\n+\n+    recipes = RecipeSet()\n+    recipes.defineHook('developNameFormatter', LocalBuilder.developNameFormatter)\n+    recipes.defineHook('developNamePersister', LocalBuilder.developNamePersister)\n+    recipes.setConfigFiles(args.configFile)\n+    recipes.parse()\n+\n+    envWhiteList = recipes.envWhiteList()\n+    envWhiteList |= set(args.white_list)\n+\n+    nameFormatter = recipes.getHook('developNameFormatter')\n+    developPersister = recipes.getHook('developNamePersister')\n+    nameFormatter = developPersister(nameFormatter)\n+    nameFormatter = LocalBuilder.makeRunnable(nameFormatter)\n+    rootPackages = recipes.generatePackages(nameFormatter, defines)\n+    touch(sorted(rootPackages.values(), key=lambda p: p.getName()))\n+\n+    generators = { 'qt-creator' : qtProjectGenerator }\n+    generators.update(recipes.getProjectGenerators())\n+\n+    if args.list:\n+        for g in generators:\n+            print(g)\n+        return 0\n+    else:\n+        if not args.package or not args.projectGenerator:\n+            print(\"bob project: error: the following arguments are required: projectGenerator, package, args\")\n+            print(args.package)\n+            print(args.projectGenerator)","path":"pym/bob/cmds/build.py","position":null,"original_position":69,"commit_id":"2d45f6f0d4c4fcc7a7d8db8a788b09053b7b85f7","original_commit_id":"68a541243cf530fd9cce2ef15c88a04b8b4dae4e","user":{"login":"rahu","id":937126,"avatar_url":"https://avatars.githubusercontent.com/u/937126?v=3","gravatar_id":"","url":"https://api.github.com/users/rahu","html_url":"https://github.com/rahu","followers_url":"https://api.github.com/users/rahu/followers","following_url":"https://api.github.com/users/rahu/following{/other_user}","gists_url":"https://api.github.com/users/rahu/gists{/gist_id}","starred_url":"https://api.github.com/users/rahu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rahu/subscriptions","organizations_url":"https://api.github.com/users/rahu/orgs","repos_url":"https://api.github.com/users/rahu/repos","events_url":"https://api.github.com/users/rahu/events{/privacy}","received_events_url":"https://api.github.com/users/rahu/received_events","type":"User","site_admin":false},"body":"..removed ... rebase can be nasty sometimes ... :-/","created_at":"2016-09-30T12:30:43Z","updated_at":"2016-09-30T12:30:43Z","html_url":"https://github.com/BobBuildTool/bob/pull/28#discussion_r81329424","pull_request_url":"https://api.github.com/repos/BobBuildTool/bob/pulls/28","_links":{"self":{"href":"https://api.github.com/repos/BobBuildTool/bob/pulls/comments/81329424"},"html":{"href":"https://github.com/BobBuildTool/bob/pull/28#discussion_r81329424"},"pull_request":{"href":"https://api.github.com/repos/BobBuildTool/bob/pulls/28"}}},"pull_request":{"url":"https://api.github.com/repos/BobBuildTool/bob/pulls/28","id":85717730,"html_url":"https://github.com/BobBuildTool/bob/pull/28","diff_url":"https://github.com/BobBuildTool/bob/pull/28.diff","patch_url":"https://github.com/BobBuildTool/bob/pull/28.patch","issue_url":"https://api.github.com/repos/BobBuildTool/bob/issues/28","number":28,"state":"open","locked":false,"title":"bob project: added project command to bob","user":{"login":"rahu","id":937126,"avatar_url":"https://avatars.githubusercontent.com/u/937126?v=3","gravatar_id":"","url":"https://api.github.com/users/rahu","html_url":"https://github.com/rahu","followers_url":"https://api.github.com/users/rahu/followers","following_url":"https://api.github.com/users/rahu/following{/other_user}","gists_url":"https://api.github.com/users/rahu/gists{/gist_id}","starred_url":"https://api.github.com/users/rahu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rahu/subscriptions","organizations_url":"https://api.github.com/users/rahu/orgs","repos_url":"https://api.github.com/users/rahu/repos","events_url":"https://api.github.com/users/rahu/events{/privacy}","received_events_url":"https://api.github.com/users/rahu/received_events","type":"User","site_admin":false},"body":"This new command basicly does nothing. It registers a new plugin\r\nhook called 'projectGenerator'. This hook is called with 3 arguments\r\n(packages, destination, package) making it possible to write individual plugins\r\nfor project file generation of different IDE's.\r\n\r\nAs an example there is a qt-creator generator added.\r\n\r\nI do not know much about qt-creator project files so maybe the template can be shorten a lot. :) ","created_at":"2016-09-18T18:04:17Z","updated_at":"2016-09-30T12:30:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8104c064e1d6a9aaff28cdf794f56a1543915a27","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/BobBuildTool/bob/pulls/28/commits","review_comments_url":"https://api.github.com/repos/BobBuildTool/bob/pulls/28/comments","review_comment_url":"https://api.github.com/repos/BobBuildTool/bob/pulls/comments{/number}","comments_url":"https://api.github.com/repos/BobBuildTool/bob/issues/28/comments","statuses_url":"https://api.github.com/repos/BobBuildTool/bob/statuses/2d45f6f0d4c4fcc7a7d8db8a788b09053b7b85f7","head":{"label":"rahu:project","ref":"project","sha":"2d45f6f0d4c4fcc7a7d8db8a788b09053b7b85f7","user":{"login":"rahu","id":937126,"avatar_url":"https://avatars.githubusercontent.com/u/937126?v=3","gravatar_id":"","url":"https://api.github.com/users/rahu","html_url":"https://github.com/rahu","followers_url":"https://api.github.com/users/rahu/followers","following_url":"https://api.github.com/users/rahu/following{/other_user}","gists_url":"https://api.github.com/users/rahu/gists{/gist_id}","starred_url":"https://api.github.com/users/rahu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rahu/subscriptions","organizations_url":"https://api.github.com/users/rahu/orgs","repos_url":"https://api.github.com/users/rahu/repos","events_url":"https://api.github.com/users/rahu/events{/privacy}","received_events_url":"https://api.github.com/users/rahu/received_events","type":"User","site_admin":false},"repo":{"id":49701228,"name":"bob","full_name":"rahu/bob","owner":{"login":"rahu","id":937126,"avatar_url":"https://avatars.githubusercontent.com/u/937126?v=3","gravatar_id":"","url":"https://api.github.com/users/rahu","html_url":"https://github.com/rahu","followers_url":"https://api.github.com/users/rahu/followers","following_url":"https://api.github.com/users/rahu/following{/other_user}","gists_url":"https://api.github.com/users/rahu/gists{/gist_id}","starred_url":"https://api.github.com/users/rahu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rahu/subscriptions","organizations_url":"https://api.github.com/users/rahu/orgs","repos_url":"https://api.github.com/users/rahu/repos","events_url":"https://api.github.com/users/rahu/events{/privacy}","received_events_url":"https://api.github.com/users/rahu/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rahu/bob","description":"Bob build tool","fork":true,"url":"https://api.github.com/repos/rahu/bob","forks_url":"https://api.github.com/repos/rahu/bob/forks","keys_url":"https://api.github.com/repos/rahu/bob/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rahu/bob/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rahu/bob/teams","hooks_url":"https://api.github.com/repos/rahu/bob/hooks","issue_events_url":"https://api.github.com/repos/rahu/bob/issues/events{/number}","events_url":"https://api.github.com/repos/rahu/bob/events","assignees_url":"https://api.github.com/repos/rahu/bob/assignees{/user}","branches_url":"https://api.github.com/repos/rahu/bob/branches{/branch}","tags_url":"https://api.github.com/repos/rahu/bob/tags","blobs_url":"https://api.github.com/repos/rahu/bob/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rahu/bob/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rahu/bob/git/refs{/sha}","trees_url":"https://api.github.com/repos/rahu/bob/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rahu/bob/statuses/{sha}","languages_url":"https://api.github.com/repos/rahu/bob/languages","stargazers_url":"https://api.github.com/repos/rahu/bob/stargazers","contributors_url":"https://api.github.com/repos/rahu/bob/contributors","subscribers_url":"https://api.github.com/repos/rahu/bob/subscribers","subscription_url":"https://api.github.com/repos/rahu/bob/subscription","commits_url":"https://api.github.com/repos/rahu/bob/commits{/sha}","git_commits_url":"https://api.github.com/repos/rahu/bob/git/commits{/sha}","comments_url":"https://api.github.com/repos/rahu/bob/comments{/number}","issue_comment_url":"https://api.github.com/repos/rahu/bob/issues/comments{/number}","contents_url":"https://api.github.com/repos/rahu/bob/contents/{+path}","compare_url":"https://api.github.com/repos/rahu/bob/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rahu/bob/merges","archive_url":"https://api.github.com/repos/rahu/bob/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rahu/bob/downloads","issues_url":"https://api.github.com/repos/rahu/bob/issues{/number}","pulls_url":"https://api.github.com/repos/rahu/bob/pulls{/number}","milestones_url":"https://api.github.com/repos/rahu/bob/milestones{/number}","notifications_url":"https://api.github.com/repos/rahu/bob/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rahu/bob/labels{/name}","releases_url":"https://api.github.com/repos/rahu/bob/releases{/id}","deployments_url":"https://api.github.com/repos/rahu/bob/deployments","created_at":"2016-01-15T06:35:30Z","updated_at":"2016-01-15T06:35:31Z","pushed_at":"2016-09-30T12:28:09Z","git_url":"git://github.com/rahu/bob.git","ssh_url":"git@github.com:rahu/bob.git","clone_url":"https://github.com/rahu/bob.git","svn_url":"https://github.com/rahu/bob","homepage":null,"size":667,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"BobBuildTool:master","ref":"master","sha":"9a4a2daedaf8db639f4973e408722a4db95e255b","user":{"login":"BobBuildTool","id":16581788,"avatar_url":"https://avatars.githubusercontent.com/u/16581788?v=3","gravatar_id":"","url":"https://api.github.com/users/BobBuildTool","html_url":"https://github.com/BobBuildTool","followers_url":"https://api.github.com/users/BobBuildTool/followers","following_url":"https://api.github.com/users/BobBuildTool/following{/other_user}","gists_url":"https://api.github.com/users/BobBuildTool/gists{/gist_id}","starred_url":"https://api.github.com/users/BobBuildTool/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BobBuildTool/subscriptions","organizations_url":"https://api.github.com/users/BobBuildTool/orgs","repos_url":"https://api.github.com/users/BobBuildTool/repos","events_url":"https://api.github.com/users/BobBuildTool/events{/privacy}","received_events_url":"https://api.github.com/users/BobBuildTool/received_events","type":"Organization","site_admin":false},"repo":{"id":49201667,"name":"bob","full_name":"BobBuildTool/bob","owner":{"login":"BobBuildTool","id":16581788,"avatar_url":"https://avatars.githubusercontent.com/u/16581788?v=3","gravatar_id":"","url":"https://api.github.com/users/BobBuildTool","html_url":"https://github.com/BobBuildTool","followers_url":"https://api.github.com/users/BobBuildTool/followers","following_url":"https://api.github.com/users/BobBuildTool/following{/other_user}","gists_url":"https://api.github.com/users/BobBuildTool/gists{/gist_id}","starred_url":"https://api.github.com/users/BobBuildTool/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BobBuildTool/subscriptions","organizations_url":"https://api.github.com/users/BobBuildTool/orgs","repos_url":"https://api.github.com/users/BobBuildTool/repos","events_url":"https://api.github.com/users/BobBuildTool/events{/privacy}","received_events_url":"https://api.github.com/users/BobBuildTool/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/BobBuildTool/bob","description":"Bob build tool","fork":false,"url":"https://api.github.com/repos/BobBuildTool/bob","forks_url":"https://api.github.com/repos/BobBuildTool/bob/forks","keys_url":"https://api.github.com/repos/BobBuildTool/bob/keys{/key_id}","collaborators_url":"https://api.github.com/repos/BobBuildTool/bob/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/BobBuildTool/bob/teams","hooks_url":"https://api.github.com/repos/BobBuildTool/bob/hooks","issue_events_url":"https://api.github.com/repos/BobBuildTool/bob/issues/events{/number}","events_url":"https://api.github.com/repos/BobBuildTool/bob/events","assignees_url":"https://api.github.com/repos/BobBuildTool/bob/assignees{/user}","branches_url":"https://api.github.com/repos/BobBuildTool/bob/branches{/branch}","tags_url":"https://api.github.com/repos/BobBuildTool/bob/tags","blobs_url":"https://api.github.com/repos/BobBuildTool/bob/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/BobBuildTool/bob/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/BobBuildTool/bob/git/refs{/sha}","trees_url":"https://api.github.com/repos/BobBuildTool/bob/git/trees{/sha}","statuses_url":"https://api.github.com/repos/BobBuildTool/bob/statuses/{sha}","languages_url":"https://api.github.com/repos/BobBuildTool/bob/languages","stargazers_url":"https://api.github.com/repos/BobBuildTool/bob/stargazers","contributors_url":"https://api.github.com/repos/BobBuildTool/bob/contributors","subscribers_url":"https://api.github.com/repos/BobBuildTool/bob/subscribers","subscription_url":"https://api.github.com/repos/BobBuildTool/bob/subscription","commits_url":"https://api.github.com/repos/BobBuildTool/bob/commits{/sha}","git_commits_url":"https://api.github.com/repos/BobBuildTool/bob/git/commits{/sha}","comments_url":"https://api.github.com/repos/BobBuildTool/bob/comments{/number}","issue_comment_url":"https://api.github.com/repos/BobBuildTool/bob/issues/comments{/number}","contents_url":"https://api.github.com/repos/BobBuildTool/bob/contents/{+path}","compare_url":"https://api.github.com/repos/BobBuildTool/bob/compare/{base}...{head}","merges_url":"https://api.github.com/repos/BobBuildTool/bob/merges","archive_url":"https://api.github.com/repos/BobBuildTool/bob/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/BobBuildTool/bob/downloads","issues_url":"https://api.github.com/repos/BobBuildTool/bob/issues{/number}","pulls_url":"https://api.github.com/repos/BobBuildTool/bob/pulls{/number}","milestones_url":"https://api.github.com/repos/BobBuildTool/bob/milestones{/number}","notifications_url":"https://api.github.com/repos/BobBuildTool/bob/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/BobBuildTool/bob/labels{/name}","releases_url":"https://api.github.com/repos/BobBuildTool/bob/releases{/id}","deployments_url":"https://api.github.com/repos/BobBuildTool/bob/deployments","created_at":"2016-01-07T11:49:10Z","updated_at":"2016-06-18T11:52:20Z","pushed_at":"2016-09-30T12:28:10Z","git_url":"git://github.com/BobBuildTool/bob.git","ssh_url":"git@github.com:BobBuildTool/bob.git","clone_url":"https://github.com/BobBuildTool/bob.git","svn_url":"https://github.com/BobBuildTool/bob","homepage":null,"size":748,"stargazers_count":6,"watchers_count":6,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":3,"forks":6,"open_issues":3,"watchers":6,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/BobBuildTool/bob/pulls/28"},"html":{"href":"https://github.com/BobBuildTool/bob/pull/28"},"issue":{"href":"https://api.github.com/repos/BobBuildTool/bob/issues/28"},"comments":{"href":"https://api.github.com/repos/BobBuildTool/bob/issues/28/comments"},"review_comments":{"href":"https://api.github.com/repos/BobBuildTool/bob/pulls/28/comments"},"review_comment":{"href":"https://api.github.com/repos/BobBuildTool/bob/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/BobBuildTool/bob/pulls/28/commits"},"statuses":{"href":"https://api.github.com/repos/BobBuildTool/bob/statuses/2d45f6f0d4c4fcc7a7d8db8a788b09053b7b85f7"}}}}
{"actor":{"display_login":"rahu"}}