Compiling on Snow Leopard
-
Sandman
FWIW, I was able to build successfully on Snow Leopard. Here is what I did:
1) If you build spidermonkey (not python-spidermonkey) from source, copy the jsautocfg.h file it generates over to spidermonkey/Darwin-i386/ (I have attached my copy which you can try out).
2) Edit line 173 of spidermonkey/libjs/jsbit.h to make it as follows: (remove one "long")
JS_STATIC_ASSERT(sizeof(unsigned long) == sizeof(JSUword));3) Patch jsprf.c per
http://github.com/janl/couchdbx-core/blob/ff47372552d10df00d74cb7989dfed4a19a6040d/patches/js/patch-jsprf.cThat should do it. All the tests seem to run fine. Hope this helps....
-
ilya
- Assigned user cleared.
Thanks, Sandman, for posting your solution -- using your changes I too was able to build successfully on Snow Leopard.
However, when I ran
python setup.py testI got a mysterious (to me) error:@@@ running test running egg_info
writing python_spidermonkey.egg-info/PKG-INFO
writing top-level names to python_spidermonkey.egg-info/top_level.txt
writing dependency_links to python_spidermonkey.egg-info/dependency_links.txt
reading manifest file 'python_spidermonkey.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'README'
writing manifest file 'python_spidermonkey.egg-info/SOURCES.txt'
running build_ext
copying build/lib.macosx-10.5-fat3-2.7/spidermonkey.so ->
Traceback (most recent call last):
File "setup.py", line 190, intest_suite = 'nose.collector',File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 152, in setup
dist.run_commands()File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()File "build/bdist.macosx-10.5-fat3/egg/setuptools/command/test.py", line 121, in run File "build/bdist.macosx-10.5-fat3/egg/setuptools/command/test.py", line 101, in with_project_on_sys_path File "build/bdist.macosx-10.5-fat3/egg/setuptools/command/test.py", line 130, in run_tests File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/main.py", line 96, in init
self.runTests()File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/main.py", line 228, in runTests
self.result = testRunner.run(self.test)File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/runner.py", line 151, in run
test(result)File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/suite.py", line 65, in call
return self.run(*args, **kwds)File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/suite.py", line 85, in run
self._wrapped_run(result)File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/suite.py", line 97, in _wrapped_run
if _isnotsuite(test):File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/suite.py", line 259, in _isnotsuite
iter(test)File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/suite.py", line 33, in iter
return iter(self._tests)AttributeError: 'FinalizingSuiteWrapper' object has no attribute '_tests' @@@
Not sure if this is because I'm using Python 2.7 (beta 2), or for some other reason. But, at least, running
python setup.py installseems to succeed and subsequently the python-spidermonkey examples seem to work =) -
ilya
- Assigned user set to Paul J. Davis
Oops, didn't really mean to clear the assigned user. Also meant to have the error message show up as inline code -- is there a way to edit my post?
-
Paul J. Davis
@ilya
That looks like something related to nosetests. I'm not doing anything weird there. Does nosetests work with 2.7?
-
ilya
@Paul
nosetestsseems to work:> nosetests ........................................................................................................... ---------------------------------------------------------------------- Ran 107 tests in 6.047s OK(ran this in the
python-spidermonkeydirectory) -
Paul J. Davis
I reckon it's just a version inconsistency with the between nose and setuptools or what not then.
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
