The patch is as follows:
--- setup.py 2009-09-03 14:42:52.000000000 +0100
+++ ../PyV8-0.7 2/setup.py 2009-09-01 11:00:54.000000000 +0100
@@ -8,10 +8,8 @@
include_dirs = [
os.path.join(os.environ.get('V8_HOME'), 'include'),
- os.path.join(os.environ.get('BOOST_HOME'))
-
]
-library_dirs = [os.path.join('/lib')]
+library_dirs = []
libraries = []
extra_compile_args = []
extra_link_args = []
@@ -38,7 +36,7 @@
os.environ.get('V8_HOME'),
]
- libraries = ["boost_python-xgcc40-mt", "v8", "c"]
+ libraries = ["boost_python", "v8", "rt"]
pyv8 = Extension(name = "_PyV8",
sources = [os.path.join("src", file) for file in
source_files],
There's a few caveats:
1) The default compiler in snow leopard doesn't seem able to compile
PyV8. I couldn't find the problem, but works if you revert to gcc-4.0,
by temporarily setting the enviroment variables to:
export CC="gcc-4.0"
export CXX="g++-4.0"
Probably setup.py could temporarily change it.
2) librt doesn't exist in mac os x. Actually it's been deprecated for
more than 10 years (
http://freshmeat.net/projects/librt/). I replaced
it with libc.
3) Mac OS X doesn't come with boost, so I had to compile it. And
because i didn't configure it correctly, it was installed in /lib.
That's why the '/lib' is in the library_dirs. This can probably be
configured to use the BOOST_HOME or something. More so, the library
name for boost_python in my system is "boost_python-xgcc40-mt". This
might be other thing that probably should be passed by some kind of
configure.
On Sep 3, 5:13 pm, Flier Lu <
flier...@gmail.com> wrote:
> Great, I will merge your patch to the branch, but I haven't a mac to test it
> :P
>
> 2009/9/3 Artur Ventura <
artur.vent...@gmail.com>