Django

Code

Ticket #3902: install.diff

File install.diff, 4.9 kB (added by nick@efford.org, 1 year ago)

Patch for install.txt to provide more detailed instructions for Windows users

  • docs/install.txt

    old new  
    127127 
    128128    1. Download the latest release from our `download page`_. 
    129129 
    130     2. Untar the downloaded file (e.g. ``tar xzvf Django-NNN.tar.gz``). 
     130    2. Untar the downloaded file (e.g. ``tar xzvf Django-NNN.tar.gz``, 
     131       where ``NNN`` is the version number of the latest release). 
     132       If you are a Windows user, you can download the command-line tool 
     133       bsdtar_ to do this, or you can use a GUI-based tool such as 7-zip_. 
    131134 
    132     3. Change into the downloaded directory (e.g. ``cd Django-NNN``). 
     135    3. Change into the directory created in step 2 (e.g. ``cd Django-NNN``). 
    133136 
    134     4. Run ``sudo python setup.py install``. 
     137    4. If you are using Linux, Mac OSX or some other flavour of Unix, enter 
     138       the command``sudo python setup.py install`` at the shell prompt. 
     139       If you are using Windows, start up a command shell with administrator 
     140       privileges and run the command ``setup.py install``. 
    135141 
    136 The command will install Django in your Python installation's ``site-packages`` 
    137 directory. 
     142These commands will install Django in your Python installation's 
     143``site-packages`` directory. 
    138144 
    139145.. _distribution specific notes: ../distributions/ 
     146.. _bsdtar: http://gnuwin32.sourceforge.net/packages/bsdtar.htm 
     147.. _7-zip: http://www.7-zip.org/ 
    140148 
    141149Installing the development version 
    142150~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
     
    144152If you'd like to be able to update your Django code occasionally with the 
    145153latest bug fixes and improvements, follow these instructions: 
    146154 
    147 1. Make sure you have Subversion_ installed. 
    148 2. Check out the Django code into your Python ``site-packages`` directory. 
     1551. Make sure that you have Subversion_ installed, and that you can run its 
     156   commands from a shell.  (Enter ``svn help`` at a shell prompt to test 
     157   this.) 
    149158 
    150    On Linux / Mac OSX / Unix, do this:: 
     1592. Check out Django's main development branch (the 'trunk') like so:: 
    151160 
    152        svn co http://code.djangoproject.com/svn/django/trunk/ django_src 
    153        ln -s `pwd`/django_src/django SITE-PACKAGES-DIR/django 
     161       svn co http://code.djangoproject.com/svn/django/trunk/ django-trunk 
    154162 
     1633. Next, you need to make sure that the Python interpreter can load Django's 
     164   code.  There are various ways of accomplishing this.  One of the most 
     165   convenient, on Linux, Mac OSX or other Unix-like systems, is to use a 
     166   symbolic link:: 
     167 
     168       ln -s `pwd`/django-trunk/django SITE-PACKAGES-DIR/django 
     169 
    155170   (In the above line, change ``SITE-PACKAGES-DIR`` to match the location of 
    156171   your system's ``site-packages`` directory, as explained in the 
    157172   "Where are my ``site-packages`` stored?" section above.) 
    158173 
    159    On Windows, do this:: 
     174   Alternatively, you can define your ``PYTHONPATH`` environment variable 
     175   so that it includes the ``django`` subdirectory of ``django-trunk``. 
     176   This is perhaps the most convenient solution on Windows systems, which 
     177   don't support symbolic links.  (Environment variables can be defined on 
     178   Windows systems `from the Control Panel`_.) 
    160179 
    161        svn co http://code.djangoproject.com/svn/django/trunk/django c:\Python24\lib\site-packages\django 
     180   .. admonition:: What about Apache and mod_python? 
    162181 
    163 3. Copy the file ``django_src/django/bin/django-admin.py`` to somewhere on your 
    164    system path, such as ``/usr/local/bin`` (Unix) or ``C:\Python24\Scripts`` 
     182      If you are using Apache and mod_python rather than Django's 
     183      development server, then instead of defining the ``PYTHONPATH`` 
     184      shell environment variable, you will need to specify the 
     185      ``PythonPath`` directive in your Apache configuration file. 
     186 
     1874. Copy the file ``django-trunk/django/bin/django-admin.py`` to somewhere on 
     188   your system path, such as ``/usr/local/bin`` (Unix) or ``C:\Python24\Scripts`` 
    165189   (Windows). This step simply lets you type ``django-admin.py`` from within 
    166190   any directory, rather than having to qualify the command with the full path 
    167191   to the file. 
    168192 
    169 You *don't* have to run ``python setup.py install``, because that command 
    170 takes care of steps 2 and 3 for you
     193You *don't* have to run ``python setup.py install``, because you've already 
     194carried out the equivalent actions in steps 3 and 4
    171195 
    172196When you want to update your copy of the Django source code, just run the 
    173 command ``svn update`` from within the ``django`` directory. When you do this, 
    174 Subversion will automatically download any changes. 
     197command ``svn update`` from within the ``django-trunk`` directory. When you do 
     198this, Subversion will automatically download any changes. 
    175199 
    176200.. _`download page`: http://www.djangoproject.com/download/ 
    177201.. _Subversion: http://subversion.tigris.org/ 
     202.. _from the Control Panel: http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/sysdm_advancd_environmnt_addchange_variable.mspx