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 3 and Version 4 of DownGrade


Ignore:
Timestamp:
06/24/07 18:26:23 (11 years ago)
Author:
Chris Arndt
Comment:

migration notice

Legend:

Unmodified
Added
Removed
Modified
  • DownGrade

    v3 v4  
    1 So you want to uninstall Turbogears. This could be because: 
    2  
    3  1. you found a bug or "feature" and you must go back to an earlier version (or something broke on a live server after upgrading) 
    4  1. you install a SVN co and want to get back to a release version 
    5  1. you just got tired of us, which I hope never happens; if so rant on the mailing list, we'll fix/add/remove your problem if reasonable of course :) 
    6  
    7 ---- 
    8 first of all let me say there is no easy_install command for uninstall, at least not yet... 
    9 ---- 
    10  
    11 = 5 minutes tutorial on site-packages = 
    12 go to your <pythonInstall>/lib/site-package dir 
    13  
    14 Everything installed by setuptools, is either in easy-install.pth setuptools.pth or a .egg (dir or file) the rest (if any) is either plain disutils or stuff you put there manually. 
    15  
    16 you will find either a folder or a file that ends in .egg, they are both packages, the only diference is that some packages are "zip safe" and others aren't, which just means you can run them from a compressed file or you need to uncompress (to a folder). So from now on a .egg is whichever applies. 
    17  
    18 Another thing to note is that old versions of all packages are not deleted, so if you have been using turbogears/setuptools for a while you will see many versions of the same package. it is safe to delete old versions, but don't delete the ones shown in easy-install.pth which we'll cover in a sec. 
    19  
    20 open the file easy-install.pth in your favorite text editor, and you will see something like this. 
    21  
    221{{{ 
    23 import sys; sys.__plen = len(sys.path) 
    24 .\nose-0.8.7-py2.4.egg 
    25 .\ruledispatch-0.5a0.dev_r2100-py2.4-win32.egg 
    26 .\celementtree-1.0.5_20051216-py2.4-win32.egg 
    27 .\elementtree-1.2.6-py2.4.egg 
    28 .\sqlobject-0.7.1dev_r1457-py2.4.egg 
    29 .\pyprotocols-1.0a0dev_r2082-py2.4-win32.egg 
    30 .\cheetah-1.0-py2.4-win32.egg 
    31 .\pastedeploy-0.4-py2.4.egg 
    32 .\paste-0.4.1-py2.4.egg 
    33 .\pysqlite-2.1.3-py2.4-win32.egg 
    34 .\pastescript-0.5.1-py2.4.egg 
    35 .\kid-0.9.1-py2.4.egg 
    36 .\formencode-0.5.1-py2.4.egg 
    37 .\configobj-4.3.1-py2.4.egg 
    38 .\simplejson-1.3-py2.4.egg 
    39 .\cherrypy-2.2.1-py2.4.egg 
    40 .\turbokid-0.9.5-py2.4.egg 
    41 .\turbojson-0.9.2-py2.4.egg 
    42 .\turbocheetah-0.9.5-py2.4.egg 
    43 .\setuptools-0.6b3-py2.4.egg 
    44 .\turbogears-0.9a6-py2.4.egg 
    45 <big line that ruins wiki formatting> 
     2#!rst 
     3.. note:: This page has been migrated to http://docs.turbogears.org/1.0/Uninstall. 
    464}}} 
    47  
    48 That is everything installed by setuptools (NOT only turbogears stuff). 
    49  
    50 If you remove a package from this file, python won't find it even if the dir/file is there: this is the actual list of packages installed not the content of site-packages. 
    51  
    52 == first step Uninstalling current TG == 
    53 The simpliest path is when the only thing you installed with easy_install/setuptools is Turbogears, then you just need to delete all .egg files/dirs and clean the easy-install.pth to look something like this: 
    54  
    55 {{{ 
    56 import sys; sys.__plen = len(sys.path) 
    57 <big line that ruins wiki formatting> 
    58 }}} 
    59  
    60 If not (and running 0.9+) run ''tg-admin info'', and delete them one-by-one from easy-install.pth. You can leave the .egg's there if you later want to reinstall that version. 
    61  
    62 If you have an older version that doesn't have ''tg-admin info'' you will have to look for the dependancies inside the egg file (<site-packages>/<turbogears>/EGG-INFO/requires.txt)  
    63  
    64 == Installing new version == 
    65  
    66 If you run the easy_install without params it will get you the lastest version (which is probably what you don't want), so you will have to specify the version via  
    67 {{{ 
    68 easy_install PackageName==1.2.3 
    69 }}} 
    70  
    71 Remember that you need to give the URL in most TG instalations or it will go directly to PyPI, where they only have the 0.8 branch.  
    72  
    73 For example if we are at 0.9a8 and you want to go back to 0.9a6 (as of 06/07/31): 
    74  
    75   on a Unix system you will have to run the following 
    76  
    77 {{{ 
    78 sudo easy_install -f http://www.turbogears.org/preview/download/index.html --script-dir /usr/local/bin TurboGears==0.9a6 
    79 }}}  
    80 just add ==<version> to the end of the "normal command" 
    81  
    82 == What if there are no eggs for my version? == 
    83 You will have to either upgrade your code or run from a svn co. 
    84  1. locate the revision number from http://trac.turbogears.org/turbogears/browser/tags 
    85  1. do a svn co or svn up to that revision number 
    86  1. cd into that directory and run 
    87 {{{ 
    88 python setup.py develop 
    89 }}} 
    90  
    91 === How to downGrade from SVN === 
    92 go to your <pythonInstall>/lib/site-package dir. and look for a file call Turbogears.egg-link delete it. if you open it you will see a path to your svn co, whatever is there is what python will think as your "current turbogears install" 
    93  
    94 == Moving between SVN revisions == 
    95 just use svn, setuptools will follow you 
    96  
    97 == how to uninstall SVN Turbogears == 
    98  
    99  1. delete Turbogears.egg-link. 
    100  1. you're done! :) 
    101  
    102