Difference between revisions of "Homebrew"

From Leaky
Jump to: navigation, search
(Installing pygame on OSX via homebrew)
 
(Installation: Fixed link to install script)
 
(One intermediate revision by the same user not shown)
Line 4: Line 4:
 
== Installation ==
 
== Installation ==
  
  $ ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
+
  $ ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go/install)"
 +
 
 +
Before doing any installations, update the recipes and check your setup is correct.
 +
 
 +
$ brew update
 +
$ brew doctor
  
 
== Installing pygame ==
 
== Installing pygame ==

Latest revision as of 13:58, 21 November 2013

IRC: irc://irc.freenode.net/machomebrew

Installation

$ ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go/install)"

Before doing any installations, update the recipes and check your setup is correct.

$ brew update
$ brew doctor

Installing pygame

$ brew install libvorbis sdl sdl_mixer sdl_image sdl_gfx sdl_ttf 
$ brew tap samueljohn/python
$ brew tap homebrew/headonly
$ brew tap homebrew/science
$ cd /usr/local/Library/Taps/homebrew-science
$ git remote set-url origin https://github.com/Homebrew/homebrew-science.git
$ cd -
$ sudo easy_install pip
$ sudo pip-2.7 install nose
$ brew install --HEAD smpeg

If smpeg fails with the following error when brew install is run with -v then you need to edit the formula

==> ./autogen.sh
aclocal: warning: autoconf input should be named 'configure.ac', not 'configure.in'
sh: autom4te: command not found
aclocal: error: echo failed with exit status: 127
$ brew edit smpeg

Find the line that reads

  depends_on :automake

and add immediately below it

  depends_on :autoconf

then save and quit the formula editor. Retry the brew install --HEAD smpeg command. Finally, get pygame to install (together with all it's dependencies).

$ brew install pygame

Once this has installed, you will need to edit your .bash_profile to set the PYTHONPATH environment variable so the default python can find the pygame module.

$ cat >> ~/.bash_profile <<'EOF'
export PYTHONPATH=/usr/local/lib/python2.7/site-packages:$PYTHONPATH
EOF