aboutsummaryrefslogtreecommitdiffstats
path: root/docs/python3.txt
diff options
context:
space:
mode:
Diffstat (limited to 'docs/python3.txt')
-rw-r--r--docs/python3.txt24
1 files changed, 12 insertions, 12 deletions
diff --git a/docs/python3.txt b/docs/python3.txt
index 19a2b268..9ae95735 100644
--- a/docs/python3.txt
+++ b/docs/python3.txt
@@ -6,7 +6,7 @@ Starting with version 0.6.2, Distribute supports Python 3. Installing and
using distribute for Python 3 code works exactly the same as for Python 2
code, but Distribute also helps you to support Python 2 and Python 3 from
the same source code by letting you run 2to3 on the code as a part of the
-build process. by setting the keyword parameter ``run_2to3`` to True.
+build process. by setting the keyword parameter ``use_2to3`` to True.
Distrubute as help during porting
@@ -18,7 +18,7 @@ setup.py so that you can run the unit tests with ``python setup.py test``.
See :ref:`test` for more information on this.
-Once you have the tests running under Python 2, you can add the run_2to3
+Once you have the tests running under Python 2, you can add the use_2to3
keyword parameters to setup(), and start running the tests under Python 3.
The test command will now first run the build command during which the code
will be converted with 2to3, and the tests will then be run from the build
@@ -27,11 +27,11 @@ directory, as opposed from the source directory as is normally done.
Distribute will convert all Python files, and also all doctests in Python
files. However, if you have doctests located in separate text files, these
will not automatically be converted. By adding them to the
-``convert_doctests_2to3`` keyword parameter Distrubute will convert them as
+``convert_2to3_doctests`` keyword parameter Distrubute will convert them as
well.
By default, the conversion uses all fixers in the ``lib2to3.fixers`` package.
-To use additional fixes, the parameter ``additional_2to3_fixers`` can be set
+To use additional fixes, the parameter ``use_2to3_fixers`` can be set
to a list of names of packages containing fixers.
A typical setup.py can look something like this::
@@ -46,9 +46,9 @@ A typical setup.py can look something like this::
package_dir = {'': 'src'},
packages = ['your', 'you.module'],
test_suite = 'your.module.tests',
- run_2to3 = True,
- convert_doctests_2to3 = ['src/your/module/README.txt'],
- additional_2to3_fixers = ['your.fixers']
+ use_2to3 = True,
+ convert_2to3_doctests = ['src/your/module/README.txt'],
+ use_2to3_fixers = ['your.fixers']
)
Differential conversion
@@ -59,7 +59,7 @@ if the source file has been changed. If you add a file to the doctests
that should be converted, it will not be converted the next time you run
the tests, since it hasn't been modified. You need to remove it from the
build directory. Also if you run the build, install or test commands before
-adding the run_2to3 parameter, you will have to remove the build directory
+adding the use_2to3 parameter, you will have to remove the build directory
before you run the test command, as the files otherwise will seem updated,
and no conversion will happen.
@@ -84,7 +84,7 @@ list ``setuptools.commands.build_py.build_py.fixers``, which then contains the
list of all fixer class names.
If you don't want to run the 2to3 conversion on the doctests in Python files,
-you can turn that off by setting ``setuptools.run_2to3_on_doctests = False``.
+you can turn that off by setting ``setuptools.use_2to3_on_doctests = False``.
Note on compatibility with setuptools
=====================================
@@ -101,9 +101,9 @@ dict and pass that dict into setup()::
extra = {}
if sys.version_info >= (3,):
- extra['run_2to3'] = True
- extra['convert_doctests_2to3'] = ['src/your/module/README.txt']
- extra['additional_2to3_fixers'] = ['your.fixers']
+ extra['use_2to3'] = True
+ extra['convert_2to3_doctests'] = ['src/your/module/README.txt']
+ extra['use_2to3_fixers'] = ['your.fixers']
setup(name='your.module',
version = '1.0',