1. 程式人生 > >ubuntu pygtk install 編譯

ubuntu pygtk install 編譯

export GTKHOME=/home/shen/pygtk-build
#make separate lib dependencies together fot build pygtk lastly
cp $GTKHOME/*/* $GTKHOME/unit -r


export PATH="$GTKHOME/bin:$PATH"
export PATH="$GTKHOME/bin:$PATH"
export LIBRARY_PATH="$GTKHOME/lib:$LIBRARY_PATH"
export LD_LIBRARY_PATH="$GTKHOME/lib:$LD_LIBRARY_PATH"
export CPPFLAGS="-I$GTKHOME/include $CPPFLAGS"
export LDFLAGS="-L$GTKHOME/lib $LDFLAGS"
export PKG_CONFIG_PATH="$GTKHOME/lib/pkgconfig"


tar jxvf zxvf
xz -d XX.tar.xz
tar -xf XX.tar
cd pygobject-2.21.0
./configure -prefix=$GTKHOME/pygobject-2.21.0
make
make install


PKG_CONFIG_PATH=/home/shen/pygtk-build/pygobject-2.21.0/lib/pkgconfig:

from gi.repository import Gtk uses the new PyGObject instead of the older PyGTK that is used with import gtk.