Changeset 4854

Show
Ignore:
Timestamp:
07/01/08 00:49:44 (2 months ago)
Author:
percious
Message:

modified install rst to support new index.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/docs/main/DownloadInstall.rst

    r4801 r4854  
    22============================= 
    33 
    4 Installing TurboGears 2 currently requires you to be willing to checkout both the Pylons and TurboGears 2 code from their respective version control systems.  TurboGears 2 is working well, and there is at least one large project built upon it already, but it's not yet documented and ready for users who aren't ready to deal with the current rate of change in the project. 
    5  
    6 We do expect to have a technology preview release sometime soon, and that should provide a clear picture of the TurboGears 2 stack, and a slightly more stable API.   However, if you want API stability and good documentation, you may want to consider building your application on TurboGears 1 and porting it to TG2 after it is officially released. 
     4Installing Turbogears2 has been made simple with the advent of the package index.  We recommend installing Turbogears2 into a virtual environment 
     5so that any existing packages will not interfere.  The basic installation goes as follows: 
     6 
     71. Install setuptools 
     8 
     92. Install virtualenv 
     10 
     113. Create a virtualenv for your project 
     12 
     134. switch to the virtualenv 
     14 
     155. easy_install turbogears development package 
     16 
     176. profit. 
     18 
    719 
    820Prerequisites: 
    921----------------------- 
    10 * gcc 
    11 * python 
     22* python 2.4 or 2.5 
    1223* appropriate python development package (python*-devel python*-dev) 
    1324 
    14 Installing Pylons: 
     25Setting up setuptools: 
    1526----------------------- 
    1627 
    17 You could easy_install pylons with command:: 
    18  
    19  $ easy_install -f http://pylonshq.com/download/0.9.7 -U Pylons 
     28 $ curl http://peak.telecommunity.com/dist/ez_setup.py | sudo python 
     29 
     30 
     31Setting up a Virtual Environment: 
     32----------------------------------- 
     33 
     34 $ sudo easy_install virtualenv 
     35 
     36  produces: 
     37  :: 
     38 
     39    Searching for virtualenv 
     40    Reading http://pypi.python.org/simple/virtualenv/ 
     41    Best match: virtualenv 1.1 
     42    Downloading http://pypi.python.org/packages/2.5/v/virtualenv/virtualenv-1.1-py2.5.egg#md5=1db8cdd823739c79330a138327239551 
     43    Processing virtualenv-1.1-py2.5.egg 
     44    creating /Users/percious/oss/tgdev/lib/python2.5/site-packages/virtualenv-1.1-py2.5.egg 
     45    Extracting virtualenv-1.1-py2.5.egg to /Users/percious/oss/tgdev/lib/python2.5/site-packages 
     46    Adding virtualenv 1.1 to easy-install.pth file 
     47    Installing virtualenv script to /Users/percious/oss/tgdev/bin 
     48 
     49    Installed /Users/percious/oss/tgdev/lib/python2.5/site-packages/virtualenv-1.1-py2.5.egg 
     50    Processing dependencies for virtualenv 
     51    Finished processing dependencies for virtualenv 
     52 
     53 $ virtualenv tg2env --no-site-packages 
     54  produces: 
     55  :: 
     56 
     57     Using real prefix '/usr/local' 
     58     New python executable in tgdev/bin/python 
     59     Installing setuptools............done. 
     60 
     61 $ cd tg2env 
     62 
     63 $ source bin/activate 
     64  and now your prompt should look something like: 
     65  :: 
     66 
     67    (tg2dev)usrname@host:tgdev $ 
     68 
     69Install Turbogears2: 
     70--------------------- 
     71 $ easy_install -i http://www.turbogears.org/2.0/downloads/1.9.7a1/index tg.devtools 
     72 
     73  a whole bunch of packages should download.  (this will take a little while) 
     74 
     75Validate the installation: 
     76---------------------------- 
     77 
     78To check if you installed TurboGears 2 correctly, type 
     79 
     80 $ paster --help 
     81 
     82  should look something like: 
     83  :: 
     84 
     85    Usage: paster [paster_options] COMMAND [command_options] 
     86 
     87    Options: 
     88      --version         show program's version number and exit 
     89      --plugin=PLUGINS  Add a plugin to the list of commands (plugins are Egg 
     90                        specs; will also require() the Egg) 
     91      -h, --help        Show this help message 
     92 
     93    Commands: 
     94      create       Create the file layout for a Python distribution 
     95      help         Display help 
     96      make-config  Install a package and create a fresh config file/directory 
     97      points       Show information about entry points 
     98      post         Run a request for the described application 
     99      request      Run a request for the described application 
     100      serve        Serve the described application 
     101      setup-app    Setup an application, given a config file 
     102 
     103    TurboGears2: 
     104      quickstart   Create a new TurboGears 2 project. 
     105      tginfo       Show TurboGears 2 related projects and their versions 
     106 
     107 
     108and you'll see a new "TurboGears2" command section in paster help. 
     109 
     110Paster has replaced the old tg-admin command, and most of the tg-admin commands have now been reimplemented as paster commands. For example, "tg-admin quickstart" command has changed to "paster quickstart" command, and "tg-admin info" command has changed to "paster tginfo" command. 
     111 
     112Be sure to check out our `What's new in TurboGears 2.0 <WhatsNew.html>`_ page to get a picture of what's changed in TurboGears2 so far. 
     113 
     114Special Considerations: 
     115---------------------------- 
     116 
     117**Cygwin** does not include the necessary binary file **sqlite3.dll**; if you want to run cygwin you'll need to install a different database. If you have cygwin installed and you want to use the default setup described here, you must perform all operations, including setup operations, within DOS command windows, not cygwin command windows. 
     118 
     119 
     120Installing the development version of Turbogears2 (from source) 
     121================================================================ 
     122 
    20123 
    21124Installing Pylons from Source: 
     
    42145  $ python setup.py develop 
    43146 
    44  
    45 **Mac OSX Leopard** comes with Python 2.5 but does not include **setuptools**. Install it using the instructions above. 
    46  
    47 **Cygwin** does not include the necessary binary file **sqlite3.dll**; if you want to run cygwin you'll need to install a different database. If you have cygwin installed and you want to use the default setup described here, you must perform all operations, including setup operations, within DOS command windows, not cygwin command windows. 
    48  
    49 Now you can make changes to the files in the Pylons directory and the code will run exactly as if you had installed a version of the egg with the changes you have made. 
    50  
    51 Installing Paver: 
    52 ----------------------- 
    53  
    54 To install paver:: 
    55  
    56  $ easy_install -U Paver 
    57  
    58  
    59147Installing TurboGears 2 from Source: 
    60 -------------------------------------- 
     148------------------------------------------------ 
    61149 
    62150TurboGears 2 are constructed by a bunch of packages. 
     
    80168 $ cd tg.ext.repoze.who 
    81169 $ easy_install Paste==dev 
    82  $ easy_install zope.interface  
     170 $ easy_install zope.interface 
    83171 $ python setup.py develop 
    84172 
     
    101189 
    102190 
    103 Validate the installation: 
    104 ---------------------------- 
    105  
    106 To check if you installed TurboGears 2 correctly, type:: 
    107  
    108  $ paster --help 
    109  
    110 and you'll see a new "TurboGears2" command section in paster help. 
    111  
    112 Paster has replaced the old tg-admin command, and most of the tg-admin commands have now been reimplemented as paster commands. For example, "tg-admin quickstart" command has changed to "paster quickstart" command, and "tg-admin info" command has changed to "paster tginfo" command. 
    113  
    114 Be sure to check out our `What's new in TurboGears 2.0 <WhatsNew.html>`_ page to get a picture of what's changed in TurboGears2 so far. 
    115191 
    116192Troubleshooting 
    117193---------------- 
    118194 
     195It is possible (but not likely) you might see a few other error messages.  Here are the correct way to fix the dependency problems so things will install properly. 
     196 
    119197If you get an error about ``ObjectDispatchController`` this means your Pylons installation is out-of-date. Make sure it's fresh ("hg pull -u" or "hg pull" followed by hg update -- alternatively you can create a brand new Pylons branch in a new directory with "hg clone"). 
    120198 
     
    126204 
    127205 . AttributeError: 'WSGIRequest' object has no attribute 'accept_language' 
    128   
     206 
    129207update your Pylons checkout with ``hg update`` and try again. 
    130208 
     
    138216... commenting out the first two lines in setup.py seems to work.  See `this discussion <http://groups.google.com/group/pylons-discuss/browse_thread/thread/1ccf9366004c8e11>`_ 
    139217 
    140 It is possible you might see a few other error messages.  Here are the correct way to fix the dependency problems so things will install properly. 
    141  
    142 If you get this error about PyProtocols:: 
    143  
    144    error: Could not find suitable distribution for Requirement.parse('PyProtocols>=1.0a0dev-r2302') 
    145  
    146 Then do this:: 
    147  
    148   $ wget http://dbsprockets.googlecode.com/files/PyProtocols-1.0a0dev-r2302.zip 
    149   $ unzip PyProtocols-1.0a0dev-r2302.zip 
    150   $ cd PyProtocols-1.0a0dev-r2302 
    151   $ python setup.py develop 
    152  
    153  
    154 If you get this error about RuleDispatch:: 
    155  
    156   error: Could not find suitable distribution for Requirement.parse('RuleDispatch>=0.5a0.dev-r2306') 
    157  
    158 Then you need to do the following:: 
    159  
    160   $ cd .. 
    161   $ wget http://dbsprockets.googlecode.com/files/RuleDispatch-0.5a0.dev-r2306.tar.gz 
    162   $ tar xzf RuleDispatch-0.5a0.dev-r2306.tar.gz 
    163   $ cd RuleDispatch-0.5a0.dev-r2306 
    164   $ python setup.py develop 
    165218 
    166219If you get this error about webhelpers, you need the latest version from mercurial::