Christoph Zwerschke wrote:

> Am 18.03.2013 05:59, schrieb raf:
> >   ARCHFLAGS='-arch i386' sudo pip-2.7 install pygresql
> >   arch -i386 sudo pip-2.7 install pygresql
> 
> I'm not a Mac user, but I can imagine that you must use "sudo -E" or
> put sudo at the beginning of the command, i.e.
> 
> sudo ARCHFLAGS='-arch i386' pip-2.7 install pygresql
> sudo arch -i386 pip-2.7 install pygresql
> 
> Or maybe it's a problem with pip, then can try to install manually, like so:
> 
> wget http://pygresql.org/files/PyGreSQL.tgz
> tar -xzf PyGreSQL.tgz
> cd PyGreSQL-4.1.1
> arch -i386 python setup.py build
> sudo python setup.py install
> 
> -- Christoph

thanks. the problem was indeed sudo removing the ARCHFLAGS variable
from the environment so whatever architecture i built for, the install
command would just build and install the 64 bit version. i noticed this
when building and installing separately from source.

so, the ideal command to install a multi-architecture library is:

  sudo ARCHFLAGS='-arch i386 -arch x86_64' pip-2.7 install pygresql

now i wonder if pip will remember that when upgrading. probably not.

btw, when installing manually, the build command needs the ARCHFLAGS
variable. using "arch -i386" doesn't help there and the install command
needs the ARCHFLAGS variable after the sudo or it needs the "arch -i386"
command (but only if installing a single architecture).

cheers,
raf

p.s. the link to this mailing list's archive is broken:

  http://mail.vex.net/pipermail/pygresql/

_______________________________________________
PyGreSQL mailing list
[email protected]
https://mail.vex.net/mailman/listinfo.cgi/pygresql

Reply via email to