Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Changes between Version 15 and Version 16 of DebianInstall


Ignore:
Timestamp:
03/04/08 19:21:31 (11 years ago)
Author:
Chris Arndt
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • DebianInstall

    v15 v16  
    1 == Installing TurboGears on Debian == 
     1{{{ 
    22 
    3 Just like many other Linux distributions, Debian systems use a strict package management system. This system "owns" all directories except those sub-trees like `/usr/local`, `/opt`, and `/home` which are dedicated for local additions. If a user installs files into the directories, the result is a confusing mess, which ultimately decreases the long-term maintainability of the system. Unfortunately, the current TurboGears install instructions for *nix systems will deposit files into the system-wide Python library directory, which really ought to be left solely under the control of the package management system. 
     3#!rst 
    44 
    5 Instead of those directions, there are two solutions for installing TurboGears. You can do it through the Debian package system (method 1). Or you can set up configurations so that the python packaging system will respect the boundaries required by Debian packaging system (method 2). 
    6  
    7 == 1) Through the Debian package system == 
    8  
    9 Bob Tanner, Gustavo Noronha, and Fredrik Steen are working on 
    10 official TurboGears packages at http://alioth.debian.org/projects/pkg-turbogears/ 
    11 and the resulting [http://packages.debian.org/python-turbogears python-turbogears] 
    12 package has now entered the experimental distribution, and is expected to eventually 
    13 enter unstable (Sid) and testing (Etch). 
    14  
    15 Installing TurboGears on a machine tracking testing can thus be done as follows: 
    16  
    17 1. Make sure that the unstable and experimental distributions are available in `/etc/apt/sources.list`.  If `MIRROR` is your selected [http://www.debian.org/mirror/list mirror], then it should look like this: 
    18  
    19 {{{ 
    20 deb http://MIRROR/debian/ testing      main contrib non-free 
    21 deb http://MIRROR/debian/ unstable     main contrib non-free 
    22 deb http://MIRROR/debian/ experimental main contrib non-free 
     5.. note:: This page has been migrated to http://docs.turbogears.org/1.0/InstallDebian 
    236}}} 
    247 
    25 2. Make APT prefer packages from testing over packages from unstable and experimental by setting `/etc/apt/preferences`: 
    26  
    27 {{{ 
    28 Package: * 
    29 Pin: release a=testing 
    30 Pin-Priority: 900 
    31  
    32 Package: * 
    33 Pin: release a=unstable 
    34 Pin-Priority: 800 
    35  
    36 Package: * 
    37 Pin: release a=experimental 
    38 Pin-Priority: 700 
    39 }}} 
    40  
    41 See the `apt_preferences(5)` man page for information about this file. 
    42  
    43 3. Install the python-turbogears package using `apt-get`, `aptitude` or whatever tool you prefer; this will pull in a lot of other packages from all three distributions. 
    44  
    45 That should be it!  You now have a TurboGears installation which will automatically track the latest versions of all dependant packages and install them as needed.  Whenever a dependant package is available from both testing and unstable, then one from testing will be preferred. 
    46  
    47  
    48 == 2) Debian Sarge and Sid (unstable): Non-root installs == 
    49  
    50 Here $ is your prompt. 
    51  
    52 1.  Make sure you are a member of the 'staff' group.  This group 
    53 has permission to write in the '/usr/local' tree.  Debian packages set 
    54 up some empty directories in this tree with the correct permissions so 
    55 that non-root installs of supplementary modules etc can be done. 
    56  
    57 The 'id' program will show you what groups you are already a member of. 
    58 If 'staff' is already listed then you can skip this step. 
    59  
    60 {{{ 
    61 $ id  
    62 uid=1001(me) gid=1001(mygroup) groups=24(cdrom),29(audio),1001(mygroup) 
    63 }}} 
    64  
    65 If not, add yourself to the 'staff' group: 
    66 {{{ 
    67 $ sudo adduser me staff 
    68 }}} 
    69  
    70 You need to log out and in again for this to take effect. 
    71  
    72  
    73 2. Install python2.4-dev.  [example: Debian provides methods other than sudo ...] 
    74  
    75 {{{ 
    76 $ sudo apt-get install python2.4-dev 
    77 }}} 
    78  
    79 3. Create a .pydistutils.cfg file in your home directory. [or use vi/emacs/...] 
    80  
    81 {{{ 
    82 $ cat > ~/.pydistutils.cfg << EOF 
    83 [install] 
    84 prefix = /usr/local 
    85  
    86 [easy_install] 
    87 site_dirs=/usr/local/lib/python$py_version_short/site-packages 
    88 EOF 
    89 }}} 
    90  
    91 (The use of `$py_version_short` in `[easy_install]` requires setuptools >= 0.6a10, however this should not be a problem as the versions distributed with TurboGears and all Debian distribution which contain a setuptools package are newer than this.) 
    92  
    93 4. Run ez_setup.py from the TurboGears download page. 
    94  
    95 {{{ 
    96 $ python2.4 ez_setup.py -f http://www.turbogears.org/download/ TurboGears 
    97 }}}