Skip to content

Instantly share code, notes, and snippets.

@yukkeorg
Last active August 29, 2015 14:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yukkeorg/0d503f684630e5436833 to your computer and use it in GitHub Desktop.
Save yukkeorg/0d503f684630e5436833 to your computer and use it in GitHub Desktop.
pyenv環境にpycairoとpygobjectをソースからインストールする

事前準備

  • pycairoとpygobjectを構築する為に必要な開発パッケージをインストールする
  • pyenvでインストール先のPythonバージョンを指定する
pyenv shell 3.4.2

pycairo

git clone git://git.cairographics.org/git/pycairo
cd pycairo
pip install .

pygobject

git clone git://git.gnome.org/pygobject
cd pygobject
PY_VERSION=$(python -V 2>&1 | cut -d' ' -f 2-)
PY_BASE="$(pyenv root)/versions/$PY_VERSION"
PKG_CONFIG_PATH="$PY_BASE/lib/pkgconfig" \
  PYCAIRO_CFLAGS="-I${PY_BASE}/include" \
  ./configure --prefix="$PY_BASE"
make clean
make -j
make install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment