diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2008-03-22 00:35:10 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2008-03-22 00:35:10 (GMT) |
commit | 73a22f0500ce713d46fce864e95402c34a45afd9 (patch) | |
tree | ef47a88b0116333b8941143b09607b84e7f233f5 /Doc/distutils/apiref.rst | |
parent | 3faa84f18e2a340c2a805a343f3b10a05dfe5fdd (diff) | |
download | cpython-73a22f0500ce713d46fce864e95402c34a45afd9.zip cpython-73a22f0500ce713d46fce864e95402c34a45afd9.tar.gz cpython-73a22f0500ce713d46fce864e95402c34a45afd9.tar.bz2 |
Add build_py_2to3.
Diffstat (limited to 'Doc/distutils/apiref.rst')
-rw-r--r-- | Doc/distutils/apiref.rst | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/Doc/distutils/apiref.rst b/Doc/distutils/apiref.rst index 36684e2..6616f83 100644 --- a/Doc/distutils/apiref.rst +++ b/Doc/distutils/apiref.rst @@ -1820,7 +1820,25 @@ This module supplies the abstract base class :class:`Command`. :synopsis: Build the .py/.pyc files of a package -.. % todo +.. class:: build_py(Command) + +.. class:: build_py_2to3(build_py) + + Alternative implementation of build_py which also runs the + 2to3 conversion library on each .py file that is going to be + installed. To use this in a setup.py file for a distribution + that is designed to run with both Python 2.x and 3.x, add:: + + try: + from distutils.command.build_py import build_py_2to3 as build_py + except ImportError: + from distutils.command.build_py import build_py + + to your setup.py, and later:: + + cmdclass = {'build_py':build_py} + + to the invocation of setup(). :mod:`distutils.command.build_scripts` --- Build the scripts of a package |