diff options
Diffstat (limited to 'scripts/build-homebrew-formula.py')
-rwxr-xr-x | scripts/build-homebrew-formula.py | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/scripts/build-homebrew-formula.py b/scripts/build-homebrew-formula.py index adffa10..d386142 100755 --- a/scripts/build-homebrew-formula.py +++ b/scripts/build-homebrew-formula.py @@ -35,10 +35,22 @@ template = '''\ # We have to build our own software before installing our Python code, # because at least one of the Python modules we install # (cryptech.py11.attribute_map) is generated during the build. + +# The declared dependency on "python" (NOT :python) is undocumented +# Homebrew voodoo to force our scripts to use Homebrew's version of +# Python so that they can see the libraries we install. Not really +# sure why this is necessary given what the documentation does say, +# but without this, at least on Sierra, I end up with scripts using +# /usr/bin/python trying to load libraries which were installed +# under /usr/local/..., which doesn't work. +# +# Reference for all the Python documented voodoo: # -# Reference for all the Python voodoo: +# http://docs.brew.sh/Python-for-Formula-Authors.html # -# https://github.com/Homebrew/brew/blob/master/share/doc/homebrew/Python-for-Formula-Authors.md +# Reference for the undocuemnted Python voodoo: +# +# /usr/local/Homebrew/Library/Homebrew/language/python.rb class {classname} < Formula @@ -50,6 +62,8 @@ class {classname} < Formula {conflicts} + depends_on "python" + resource "pyserial" do url "https://pypi.python.org/packages/3c/d8/a9fa247ca60b02b3bebbd61766b4f321393b57b13c53b18f6f62cf172c08/pyserial-3.1.1.tar.gz" sha256 "d657051249ce3cbd0446bcfb2be07a435e1029da4d63f53ed9b4cdde7373364c" |