From 3badafc8a7428b1e8d614e17f9c1a70035724f8e Mon Sep 17 00:00:00 2001 From: Pablo Hoffman Date: Tue, 6 Jan 2009 00:15:55 +0000 Subject: [PATCH] updated installation doc --HG-- extra : convert_revision : svn%3Ab85faa78-f9eb-468e-a121-7cced6da292c%40654 --- scrapy/trunk/docs/intro/install.rst | 89 +++++++++++++++++------------ 1 file changed, 53 insertions(+), 36 deletions(-) diff --git a/scrapy/trunk/docs/intro/install.rst b/scrapy/trunk/docs/intro/install.rst index 52a7e630e..268c48096 100644 --- a/scrapy/trunk/docs/intro/install.rst +++ b/scrapy/trunk/docs/intro/install.rst @@ -1,5 +1,7 @@ .. _install: +.. highlight:: sh + ============ Installation ============ @@ -7,76 +9,91 @@ Installation Requirements ============ -* `Python `_ 2.5 or above -* `Twisted `_ -* `libxml2 `_ -* `pyopenssl `_ +* `Python `_ 2.5 or 2.6 +* `Twisted `_ 8.0 or above +* `libxml2 `_ (2.6.28 or above recommended) Optional: -* `spidermonkey `_ -* `simplejson `_ +* `pyopenssl `_ (for HTTPS support) +* `spidermonkey `_ (for Javascript support) Install Python ============== -Scrapy works with Python 2.5 or above, you can get it at http://www.python.org. +Scrapy works with Python 2.5 or 2.6, you can get it at http://www.python.org/download/ Install required libraries ========================== -The procedure for installing the required third party libraries (twisted, libxml2 and pyopenssl) depends on the platform and OS you use. +The procedure for installing the required third party libraries depends on the +platform and operating system you use. -If you're running Ubuntu/Debian Linux do: +Ubuntu/Debian +------------- -.. code-block:: bash +If you're running Ubuntu/Debian Linux run the following command as root:: - apt-get install python-twisted python-libxml2 python-pyopenssl + $ apt-get install python-twisted python-libxml2 python-pyopenssl -Or in Arch Linux do: +Arch +---- -.. code-block:: bash +If you are running Arch Linux use the following command to install required dependencies:: - pacman -S twisted python-lxml pyopenssl + $ pacman -S twisted python-lxml pyopenssl +Windows +------- + +1. Get Twisted for Windows here:: + http://twistedmatrix.com/trac/wiki/Downloads +2. Get PyOpenSSL for Windows here:: + http://sourceforge.net/project/showfiles.php?group_id=31249 +3. Get libxml2 for Windows here:: + http://users.skynet.be/sbi/libxml-python/ Install Scrapy code =================== -We're working hard to get the first release of Scrapy out. In the meantime, please download the latest development version from the Subversion_ repository. +We're working hard to get the first release of Scrapy out. In the meantime, +please download the latest development version from the Subversion_ repository. + +.. _Subversion: http://subversion.tigris.org/ To do this, follow this steps: -1. Check out Scrapy code (you will need to have Subversion_ installed): +1. Check out Scrapy code +------------------------ + +Check out Scrapy code (you will need to have Subversion_ installed):: - .. code-block:: bash + $ svn co http://svn.scrapy.org/scrapy/trunk/ scrapy-trunk - svn co http://svn.scrapy.org/scrapy/trunk/ scrapy-trunk +2. Add Scrapy to your Python path +--------------------------------- -2. Add Scrapy to your Python path. You can do this by making a symbolic link to your system ``site-packages`` directory like this: +You can do this by making a symbolic link to your system ``site-packages`` +directory like this:: - .. code-block:: bash + $ ln -s `pwd`/scrapy-trunk/scrapy SITE-PACKAGES/scrapy - ln -s `pwd`/scrapy-trunk/scrapy SITE-PACKAGES/scrapy +Where ``SITE-PACKAGES`` is the location of your system ``site-packages`` +directory, to find this out execute the following:: - Where ``SITE-PACKAGES`` is the location of your system ``site-packages`` directory, to find this out execute the following: + $ python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()" - .. code-block:: bash +Or by adding the ``scrapy-trunk`` directory to your ``PYTHONPATH`` environment +variable, like this:: - python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()" + $ export PYTHONPATH=`pwd`/scrapy-trunk:$PYTHONPATH +3. Make the scrapy-admin.py script executable +--------------------------------------------- - Or by adding the ``scrapy-trunk`` directory to your ``PYTHONPATH`` environment variable, like this: - - .. code-block:: bash - - export PYTHONPATH=`pwd`/scrapy-trunk:PYTHONPATH - - -3. Make the ``scrapy-trunk/scrapy/bin/scrapy-admin.py`` script executable system-wide. To do this create a symbolic link to the file in a directory on your sistem path, like: +Make the ``scrapy-trunk/scrapy/bin/scrapy-admin.py`` script executable +system-wide. To do this create a symbolic link to the file in a directory on +your sistem path, like:: - .. code-block:: bash + $ ln -s `pwd`/scrapy-trunk/scrapy/bin/scrapy-admin.py /usr/local/bin - ln -s `pwd`/scrapy-trunk/scrapy/bin/scrapy-admin.py /usr/local/bin - -.. _Subversion: http://subversion.tigris.org/