mirror of https://github.com/scrapy/scrapy.git
switched default selectors backend to lxml
This commit is contained in:
parent
af0e1c40f5
commit
6e8edbd72e
|
|
@ -2,13 +2,13 @@ Source: scrapy-SUFFIX
|
|||
Section: python
|
||||
Priority: optional
|
||||
Maintainer: Insophia Team <info@insophia.com>
|
||||
Build-Depends: debhelper (>= 7.0.50), python (>=2.6), python-twisted, python-w3lib
|
||||
Build-Depends: debhelper (>= 7.0.50), python (>=2.6), python-twisted, python-w3lib, python-lxml
|
||||
Standards-Version: 3.8.4
|
||||
Homepage: http://scrapy.org/
|
||||
|
||||
Package: scrapy-SUFFIX
|
||||
Architecture: all
|
||||
Depends: ${python:Depends}, python-libxml2, python-twisted, python-openssl, python-w3lib (>= 1.1-r23)
|
||||
Depends: ${python:Depends}, python-lxml, python-twisted, python-openssl, python-w3lib (>= 1.1-r23)
|
||||
Recommends: python-setuptools
|
||||
Conflicts: python-scrapy, scrapy, scrapy-0.11
|
||||
Provides: python-scrapy, scrapy
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ Debian or Ubuntu (9.04 or older)
|
|||
|
||||
If you're running Debian Linux, run the following command as root::
|
||||
|
||||
apt-get install python-twisted python-libxml2 python-pyopenssl python-simplejson
|
||||
apt-get install python-twisted python-lxmlxml python-pyopenssl python-simplejson
|
||||
|
||||
Then::
|
||||
|
||||
|
|
@ -124,7 +124,7 @@ Arch Linux
|
|||
|
||||
If you are running Arch Linux, run the following command as root::
|
||||
|
||||
pacman -S twisted libxml2 pyopenssl python-simplejson
|
||||
pacman -S twisted python-lxml pyopenssl python-simplejson
|
||||
|
||||
Then::
|
||||
|
||||
|
|
|
|||
|
|
@ -18,13 +18,13 @@ elif settings['SELECTORS_BACKEND'] == 'dummy':
|
|||
from scrapy.selector.dummysel import *
|
||||
else:
|
||||
try:
|
||||
import libxml2
|
||||
import lxml
|
||||
except ImportError:
|
||||
try:
|
||||
import lxml
|
||||
import libxml2
|
||||
except ImportError:
|
||||
from scrapy.selector.dummysel import *
|
||||
else:
|
||||
from scrapy.selector.lxmlsel import *
|
||||
from scrapy.selector.libxml2sel import *
|
||||
else:
|
||||
from scrapy.selector.libxml2sel import *
|
||||
from scrapy.selector.lxmlsel import *
|
||||
|
|
|
|||
6
setup.py
6
setup.py
|
|
@ -120,12 +120,8 @@ try:
|
|||
except ImportError:
|
||||
from distutils.core import setup
|
||||
else:
|
||||
setup_args['install_requires'] = ['Twisted>=8.0', 'w3lib>=1.1', 'pyOpenSSL']
|
||||
setup_args['install_requires'] = ['Twisted>=8.0', 'w3lib>=1.1', 'lxml', 'pyOpenSSL']
|
||||
if sys.version_info < (2, 6):
|
||||
setup_args['install_requires'] += ['simplejson']
|
||||
try:
|
||||
import libxml2
|
||||
except ImportError:
|
||||
setup_args['install_requires'] += ['lxml']
|
||||
|
||||
setup(**setup_args)
|
||||
|
|
|
|||
Loading…
Reference in New Issue