私はここ数晩、gcc-4.2 と Python2.6 を使用して Mac OSX Lion に py2cairo をインストールしようと試み、これらのリンクに記載されている多くのアプローチを試みました (とりわけ、新しいユーザーとして、2 つのリンクしか投稿できません)。 ):
http://www.niconomicon.net/blog/2011/10/09/2120.wrestling.python.snow.leopard
デフォルトのpythonでMac OSXにPyCairo 1.10をインストールする方法
残念ながら、間違ったヘッダー ファイルが見つかるという問題がまだ発生しています。私の環境設定とwafビルドからのエラー出力については、以下を参照してください。ポインタをいただければ幸いです。ありがとう!
Steves-Mac-Pro:py2cairo-1.10.0 dr_steve_kramer$ env
MANPATH=/sw/share/man:/usr/share/man:/usr/local/share/man:/usr/X11/man:/usr/local/mysql/man:/sw/lib/perl5/5.12.3/man:/usr/X11R6/man
TERM_PROGRAM=Apple_Terminal
TERM=xterm-256color
SHELL=/bin/bash
TMPDIR=/var/folders/8r/2kt_yqyx2dg2g83m0dyhcy740000gn/T/
LIBRARY_PATH=/Developer/SDKs/MacOSX10.6.sdk/usr/lib
PERL5LIB=/sw/lib/perl5:/sw/lib/perl5/darwin
Apple_PubSub_Socket_Render=/tmp/launch-bnnjZo/Render
TERM_PROGRAM_VERSION=303
OLDPWD=/private/tmp
TERM_SESSION_ID=3A9C4E28-D669-4134-A333-A13920514ED7
USER=dr_steve_kramer
LD_LIBRARY_PATH=/Library/Frameworks/Python.framework/Versions/6.3/lib:/Library/Frameworks/Python.framework/Versions/6.3:
COMMAND_MODE=unix2003
SSH_AUTH_SOCK=/tmp/launch-c3CJUO/Listeners
__CF_USER_TEXT_ENCODING=0x1F5:0:0
Apple_Ubiquity_Message=/tmp/launch-pYg8fw/Apple_Ubiquity_Message
PATH=/Library/Frameworks/Python.framework/Versions/6.3/bin:/Library/Frameworks/Python.framework/Versions/Current/bin:/opt/local/bin:/opt/local/sbin:/sw/bin:/sw/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/local/bin:/usr/local/mysql/bin:/usr/local/bin/f2j-0.7/bin:/usr/local/jaxws-ri:/usr/X11R6/bin
MKL_NUM_THREADS=1
C_INCLUDE_PATH=/Developer/SDKs/MacOSX10.6.sdk/usr/include
PWD=/private/tmp/py2cairo-1.10.0
LANG=en_US.UTF-8
JAXWS_HOME=/usr/local/jaxws-ri
CXX=g++-4.2
SHLVL=1
HOME=/Users/dr_steve_kramer
CFLAGS=-I/usr/include/gcc/darwin/4.2/
LINKFLAGS=-search_dylibs_first -L /Library/Frameworks/Python.framework/Versions/6.3/lib/
PYTHONPATH=/Library/Frameworks/Python.framework/Versions/6.3/bin
LOGNAME=dr_steve_kramer
ACLOCAL_FLAGS=-I/usr/local/Cellar/pkg-config/0.25/share/aclocal
PKG_CONFIG_PATH=/sw/bin/pkg-config
ARCHFLAGS=-arch x86_64
INFOPATH=/sw/share/info:/sw/info:/usr/share/info
CC=/usr/bin/gcc-4.2
DISPLAY=/tmp/launch-CzK5Wg/org.x:0
_=/usr/bin/env
Steves-Mac-Pro:py2cairo-1.10.0 dr_steve_kramer$ python2.6 waf configure
./options()
Setting top to : /private/tmp/py2cairo-1.10.0
Setting out to : /private/tmp/py2cairo-1.10.0/build_directory
./configure()
Checking for 'gcc' (c compiler) : ok
Checking for program python : /Library/Frameworks/Python.framework/Versions/6.3/bin/python
python executable '/Library/Frameworks/Python.framework/Versions/6.3/bin/python' different from sys.executable '/Library/Frameworks/Python.framework/Versions/6.3/Resources/Python.app/Contents/MacOS/Python'
Checking for python version : (2, 6, 6, 'final', 0)
Checking for library python2.6 : yes
Checking for program python2.6-config : /Library/Frameworks/Python.framework/Versions/6.3/bin/python2.6-config
Checking for header Python.h : yes
Checking for program pkg-config : /sw/bin/pkg-config
Checking for 'cairo' >= 1.10.0 : yes
Configuration:
PREFIX : /usr/local
LIBDIR : /usr/local/lib
'configure' finished successfully (1.577s)
Steves-Mac-Pro:py2cairo-1.10.0 dr_steve_kramer$ python2.6 waf build
./options()
Waf: Entering directory `/private/tmp/py2cairo-1.10.0/build_directory'
./build()
src/build()
[1/9] c: src/cairomodule.c -> build_directory/src/cairomodule.c.1.o
[2/9] c: src/context.c -> build_directory/src/context.c.1.o
[3/9] c: src/font.c -> build_directory/src/font.c.1.o
[4/9] c: src/path.c -> build_directory/src/path.c.1.o
[5/9] c: src/pattern.c -> build_directory/src/pattern.c.1.o
[6/9] c: src/matrix.c -> build_directory/src/matrix.c.1.o
[7/9] c: src/surface.c -> build_directory/src/surface.c.1.o
[8/9] subst: pycairo.pc.in -> pycairo.pc
In file included from /Library/Frameworks/Python.framework/Versions/6.3/include/python2.6/unicodeobject.h:4In file included from /Library/Frameworks/Python.framework/Versions/6.3/include/python2.6/unicodeobject.h:4In file included from /Library/Frameworks/Python.framework/Versions/6.3/include/python2.6/unicodeobject.h:4,
from /Library/Frameworks/Python.framework/Versions/6.3/include/python2.6/Python.h:85,
from /Library/Frameworks/Python.framework/Versions/6.3/include/python2.6/Python.h:85In file included from /Library/Frameworks/Python.framework/Versions/6.3/include/python2.6/unicodeobject.h:4,
from ../src/pattern.c:32,
from /Library/Frameworks/Python.framework/Versions/6.3/include/python2.6/Python.h:85In file included from /Library/Frameworks/Python.framework/Versions/6.3/include/python2.6/unicodeobject.h:4,
from ../src/surface.c:32,
from ../src/matrix.c:32In file included from /Library/Frameworks/Pyth:
:
/usr/include/gcc/darwin/4.2/stdarg.h:5:2:,
from /Library/Frameworks/Python.framework/Versions/6.3/include/python2.6/Python.h:85on.framework/Versions/6.3/include/python2.6/unicodeobject.h:4In file included from /Library/Frameworks/Python.framework/Versions/6.3/include/python2.6/unicodeobject.h:4,
from /Library/Frameworks/Python.framework/Versions/6.3/include/python2.6/Python.h:85/usr/include/gcc/darwin/4.2/stdarg.h:5:2: ,
from ../src/cairomodule.c:32:
error: :
,
from ../src/path.c:32 /usr/include/gcc/darwin/4.2/stdarg.h:5:2:,
from /Library/Frameworks/Python.framework/Versions/6.3/include/python2.6/Python.h:85#error ,
from /Library/Frameworks/Python.framework/Versions/6.3/include/python2.6/Python.h:85"This header only supports __MWERKS__." :
,
from ../src/context.c:32error: /usr/include/gcc/darwin/4.2/stdarg.h:5:2:,
from ../src/font.c:32error:
#error /usr/include/gcc/darwin/4.2/stdarg.h:5:2::
:
"This header only supports __MWERKS__." #error /usr/include/gcc/darwin/4.2/stdarg.h:5:2:/usr/include/gcc/darwin/4.2/stdarg.h:5:2:
"This header only supports __MWERKS__."error: #error
error: "This header only supports __MWERKS__."#error error: error:
"This header only supports __MWERKS__."#error #error
"This header only supports __MWERKS__.""This header only supports __MWERKS__."
In file included from /Developer/SDKs/MacOSX10.6.sdk/usr/include/wchar.h:111,
from /Library/Frameworks/Python.framework/Versions/6.3/include/python2.6/unicodeobject.h:120,
from /Library/Frameworks/Python.framework/Versions/6.3/include/python2.6/Python.h:85,
from ../src/matrix.c:32:
/usr/include/gcc/darwin/4.2/stdarg.h:5:2: error: #error "This header only supports __MWERKS__."