ClusterHQ/flocker — pull request #1016 by adamtheturtle (2014-12-11 11:57:49+00:00)
Title: Added example flocker.rb file

Design for https://clusterhq.atlassian.net/browse/FLOC-660

I think that the Homebrew instructions for Python packages have been updated since I last looked.
See https://github.com/Homebrew/homebrew/blob/master/share/doc/homebrew/Formula-Cookbook.md#specifying-gems-python-modules-etc-as-dependencies.

Following their instructions solved this problem and is therefore the design I went for.

This design includes a `flocker.rb` file which would be in the `homebrew-tap` repository versioned as the next release version.
I 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).
I then used the `mkpydeps` script linked from the Homebrew docs to create the resource stanzas.
This does not look at specified versions and gets the resource URLs and sha1s of the latest versions of each dependency.
Therefore, I manually looked at each resource and compared it to its equivalent in Flocker's `setup.py`.
If there was an `==` equivalent in `setup.py` I replaced the URL and sha1.

This can be tested on OS X by running:
```
brew install --verbose --debug flocker.rb
brew test flocker.rb
```

You can do this with `brew install python` done before, after or not at all.
`flocker-deploy` should not already be on your PATH.

`brew uninstall flocker` afterwards to clean up.

I'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).

If 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.
This could potentially lead to the whole Homebrew script being generated automatically given a version number and/or a download link.

It 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.