[Checkins] SVN: zope.fixers/trunk/ Updated the docs a bit.

Lennart Regebro regebro at gmail.com
Sun Dec 6 05:15:23 EST 2009


Log message for revision 106219:
  Updated the docs a bit.
  

Changed:
  U   zope.fixers/trunk/CHANGES.txt
  U   zope.fixers/trunk/README.txt

-=-
Modified: zope.fixers/trunk/CHANGES.txt
===================================================================
--- zope.fixers/trunk/CHANGES.txt	2009-12-06 09:54:40 UTC (rev 106218)
+++ zope.fixers/trunk/CHANGES.txt	2009-12-06 10:15:20 UTC (rev 106219)
@@ -2,7 +2,7 @@
 *******
 
 ==================
-1.0.0 (unreleased)
+1.0.0 (2009-09-12)
 ==================
 
 Initial release. Includes the implements fix to change implements(IFoo) 

Modified: zope.fixers/trunk/README.txt
===================================================================
--- zope.fixers/trunk/README.txt	2009-12-06 09:54:40 UTC (rev 106218)
+++ zope.fixers/trunk/README.txt	2009-12-06 10:15:20 UTC (rev 106219)
@@ -14,9 +14,29 @@
 Usage
 -----
 
-To use this you typically want all teh fixers from lib2to3, and add the
-fixers from zope.fixers to it. Like so:
+Typically you will use zope.fixers together with Distribute's 2to3 support.
+This is done by adding zope.fixers to some parameters in setup():
 
+    >>> setup(
+    ...     install_requires = ['zope.fixers'],
+    ...     use_2to3 = True,
+    ...     use_2to3_fixers = ['zope.fixers'],
+    ... )
+    
+For an example usage of a complex case, look at:
+
+    http://svn.zope.org/zope.interface/branches/regebro-python3/setup.py?rev=106216&view=markup
+
+That setup.py supports both distutils, setuptools and distribute, all versions
+of python from 2.4 to 3.1, and has an optional C-extension, so don't worry if
+it's overwhelming. For simple projects all you need is to use Distribute and
+add the above three lines to the setup.py. Distribute has more documentation
+on how to use it to support Python 3 porting.
+
+
+If you don't want to use Distribute things get a bit more complex, as you have
+to make the list of fixers yourself and call lib2to3 with that:
+
     >>> from lib2to3.refactor import RefactoringTool, get_fixers_from_package
     >>> fixers = get_fixers_from_package('lib2to3.fixes') + \
     ...          get_fixers_from_package('zope.fixers')
@@ -25,8 +45,3 @@
 
     >>> tool = RefactoringTool(fixers)
     >>> tool.refactor(files, write=True)
-
-For an example usage within setuptools, look at:
-
-http://svn.zope.org/zope.interface/branches/regebro-python3/build_ext_3.py?rev=98993&view=markup
-



More information about the checkins mailing list