{"action":"created","issue":{"url":"https://api.github.com/repos/ClusterHQ/flocker/issues/1016","labels_url":"https://api.github.com/repos/ClusterHQ/flocker/issues/1016/labels{/name}","comments_url":"https://api.github.com/repos/ClusterHQ/flocker/issues/1016/comments","events_url":"https://api.github.com/repos/ClusterHQ/flocker/issues/1016/events","html_url":"https://github.com/ClusterHQ/flocker/pull/1016","id":51678285,"number":1016,"title":"[FLOC-660] Change Homebrew script to not conflict with Python","user":{"login":"adamtheturtle","id":797801,"avatar_url":"https://avatars.githubusercontent.com/u/797801?v=3","gravatar_id":"","url":"https://api.github.com/users/adamtheturtle","html_url":"https://github.com/adamtheturtle","followers_url":"https://api.github.com/users/adamtheturtle/followers","following_url":"https://api.github.com/users/adamtheturtle/following{/other_user}","gists_url":"https://api.github.com/users/adamtheturtle/gists{/gist_id}","starred_url":"https://api.github.com/users/adamtheturtle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adamtheturtle/subscriptions","organizations_url":"https://api.github.com/users/adamtheturtle/orgs","repos_url":"https://api.github.com/users/adamtheturtle/repos","events_url":"https://api.github.com/users/adamtheturtle/events{/privacy}","received_events_url":"https://api.github.com/users/adamtheturtle/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":18,"created_at":"2014-12-11T11:57:49Z","updated_at":"2015-01-07T12:30:40Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ClusterHQ/flocker/pulls/1016","html_url":"https://github.com/ClusterHQ/flocker/pull/1016","diff_url":"https://github.com/ClusterHQ/flocker/pull/1016.diff","patch_url":"https://github.com/ClusterHQ/flocker/pull/1016.patch"},"body":"Design for https://clusterhq.atlassian.net/browse/FLOC-660\r\n\r\nI think that the Homebrew instructions for Python packages have been updated since I last looked.\r\nSee https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/Formula-Cookbook.md#specifying-gems-python-modules-etc-as-dependencies.\r\n\r\nFollowing their instructions solved this problem and is therefore the design I went for.\r\n\r\nThis design includes a `flocker.rb` file which would be in the `homebrew-tap` repository versioned as the next release version.\r\nI started to make this file by copying the `jrnl` example linked from the Homebrew docs (https://github.com/Homebrew/homebrew/blob/master/Library/Formula/jrnl.rb).\r\nI then used the `mkpydeps` script linked from the Homebrew docs to create the resource stanzas.\r\nThis does not look at specified versions and gets the resource URLs and sha1s of the latest versions of each dependency.\r\nTherefore, I manually looked at each resource and compared it to its equivalent in Flocker's `setup.py`.\r\nIf there was an `==` equivalent in `setup.py` I replaced the URL and sha1.\r\n\r\nThis can be tested on OS X by running:\r\n```\r\nbrew install --verbose --debug flocker.rb\r\nbrew test flocker.rb\r\n```\r\n\r\nYou can do this with `brew install python` done before, after or not at all.\r\n`flocker-deploy` should not already be on your PATH.\r\n\r\n`brew uninstall flocker` afterwards to clean up.\r\n\r\nI'd like a look-over / design review before I continue, in case people are not happy with the final result of my planned instructions (flocker.rb).\r\n\r\nIf this is suitable, I will write instructions to do what I explained above, and a follow up issue to improve the `mkpydeps` script to account for versions if possible.\r\nThis could potentially lead to the whole Homebrew script being generated automatically given a version number and/or a download link.\r\n\r\nIt may be useful to compare this to the latest script we ship https://raw.githubusercontent.com/ClusterHQ/homebrew-tap/master/flocker-0.3.2.rb."},"comment":{"url":"https://api.github.com/repos/ClusterHQ/flocker/issues/comments/69015720","html_url":"https://github.com/ClusterHQ/flocker/pull/1016#issuecomment-69015720","issue_url":"https://api.github.com/repos/ClusterHQ/flocker/issues/1016","id":69015720,"user":{"login":"adamtheturtle","id":797801,"avatar_url":"https://avatars.githubusercontent.com/u/797801?v=3","gravatar_id":"","url":"https://api.github.com/users/adamtheturtle","html_url":"https://github.com/adamtheturtle","followers_url":"https://api.github.com/users/adamtheturtle/followers","following_url":"https://api.github.com/users/adamtheturtle/following{/other_user}","gists_url":"https://api.github.com/users/adamtheturtle/gists{/gist_id}","starred_url":"https://api.github.com/users/adamtheturtle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adamtheturtle/subscriptions","organizations_url":"https://api.github.com/users/adamtheturtle/orgs","repos_url":"https://api.github.com/users/adamtheturtle/repos","events_url":"https://api.github.com/users/adamtheturtle/events{/privacy}","received_events_url":"https://api.github.com/users/adamtheturtle/received_events","type":"User","site_admin":false},"created_at":"2015-01-07T12:30:40Z","updated_at":"2015-01-07T12:30:40Z","body":"I have addressed the inline comments (either by replying or changing the code), and the following final comments have been done:\r\n\r\n * script should be moved to a module leaving `./admin/bin/make_homebrew_script` as a stub script (in line with the other admin tools)\r\n* Split the script into some functions \r\n* Add a little more validation and error reporting\r\n\r\nThe following have not:\r\n\r\n * some command line help (`twisted.python.usage`)\r\n * it should take a positional argument containing the path to a local Flocker sdist package (I think that's what @tomprince would prefer if we get round to running this automatically from Buildbot build artifacts.)\r\n \r\nIf changes need to be made to help this run on Buildbot, they can be made in https://clusterhq.atlassian.net/browse/FLOC-1150."}}