mirror of https://github.com/scrapy/scrapy.git
removed unmaintained spidermonkey bindings
This commit is contained in:
parent
1646482bef
commit
4a371a6cd3
|
|
@ -1,24 +0,0 @@
|
|||
from twisted.trial import unittest
|
||||
|
||||
class SpidermonkeyTest(unittest.TestCase):
|
||||
|
||||
def setUp(self):
|
||||
try:
|
||||
from scrapy.xlib.spidermonkey import Runtime
|
||||
r = Runtime()
|
||||
self.cx = r.new_context()
|
||||
except ImportError:
|
||||
raise unittest.SkipTest("Spidermonkey C library not available")
|
||||
|
||||
def test_spidermonkey(self):
|
||||
"""Spidermonkey basic functionality tests"""
|
||||
|
||||
self.cx.eval_script("var item0={'price':50}")
|
||||
self.cx.eval_script("var item1={'price':20}")
|
||||
self.assertEqual(self.cx.eval_script("item0"), {'price': 50})
|
||||
self.assertEqual(self.cx.eval_script("item1"), {'price': 20})
|
||||
self.cx.eval_script("var itemArray=new Array(item0, item1)")
|
||||
self.assertEqual(self.cx.eval_script("itemArray"), [{'price': 50}, {'price':20}])
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
Spidermonkey bindings for python (based on standard library ctypes)
|
||||
|
||||
Quick instructions to install with scrapy package.
|
||||
|
||||
* go to http://ftp.mozilla.org/pub/mozilla.org/js/ and download the
|
||||
release 1.7.0.
|
||||
|
||||
* Extract the source, go to js/src and run make -f Makefile.ref
|
||||
|
||||
* copy the file src/Linux_All_DBG.OBJ/libjs.so to /usr/lib
|
||||
and run ldconfig
|
||||
|
||||
Testing
|
||||
-------
|
||||
|
||||
Please run python jstest.py after installation. This script contains
|
||||
some tests to corroborate that python bindings installation is OK.
|
||||
|
||||
Known issues
|
||||
------------
|
||||
ctypes fails when loading the library, with old versions of libgcc. We have succeded tests with libgcc version 4.1.2 and higher, and failed with libgcc version libgcc-3.4.6. The exact error message in this case is:
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "<stdin>", line 1, in <module>
|
||||
File "/usr/lib64/python2.5/ctypes/__init__.py", line 340, in __init__
|
||||
self._handle = _dlopen(self._name, mode)
|
||||
OSError: /usr/lib/libjs.so.0: undefined symbol: __clzdi2
|
||||
|
|
@ -1 +0,0 @@
|
|||
from spidermonkey import *
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
#defines order in which spidermonkey bin library will be searched
|
||||
try_libs = ["libmozjs.so.0d", "libjs.so", "libjs.so.0"]
|
||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue