diff --git a/debian/control b/debian/control index 68376f76f..7cd4013c6 100644 --- a/debian/control +++ b/debian/control @@ -2,13 +2,13 @@ Source: scrapy-SUFFIX Section: python Priority: optional Maintainer: Insophia Team -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 diff --git a/docs/intro/install.rst b/docs/intro/install.rst index 4f7aa52be..4f6e30fec 100644 --- a/docs/intro/install.rst +++ b/docs/intro/install.rst @@ -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:: diff --git a/scrapy/selector/__init__.py b/scrapy/selector/__init__.py index 392108ea7..e9af791ac 100644 --- a/scrapy/selector/__init__.py +++ b/scrapy/selector/__init__.py @@ -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 * diff --git a/setup.py b/setup.py index 7bcd127a4..a085fa450 100644 --- a/setup.py +++ b/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)