Developer talk follows. XCode 4 removes the PowerPC compiler, breaking package installers that try to build universal libraries.
> pip install keyring…/usr/libexec/gcc/powerpc-apple-darwin10/4.2.1/as: assembler (/usr/bin/../libexec/gcc/darwin/ppc/as or /usr/bin/../local/libexec/gcc/darwin/ppc/as) for architecture ppc not installed
Installed assemblers are:
/usr/bin/../libexec/gcc/darwin/x86_64/as for architecture x86_64
/usr/bin/../libexec/gcc/darwin/i386/as for architecture i386
keyring/backends/osx_keychain.c:117: fatal error: error writing to -: Broken pipe
compilation terminated.
lipo: can't open input file: /var/tmp//cdXmPvrV.out (No such file or directory)
error: command 'gcc-4.2' failed with exit status 1
That was from pip, but distutils, setuptools, easy_install, and "python setup.py install" should all fail with a similar error.
To fix it, tell the compiler explicitly not to bother with PowerPC. Prefix the build or installation command line with this:
ARCHFLAGS="-arch i386 -arch x86_64"
sudo ARCHFLAGS="-arch i386 -arch x86_64" pip install keyring
export ARCHFLAGS="-arch i386 -arch x86_64"