summaryrefslogtreecommitdiffstats
path: root/Doc/library/packaging.compiler.rst
diff options
context:
space:
mode:
authorÉric Araujo <merwok@netwok.org>2011-10-21 05:34:00 (GMT)
committerÉric Araujo <merwok@netwok.org>2011-10-21 05:34:00 (GMT)
commit4d4b19e294e3748b0e68fec4278d5bde0b0011c8 (patch)
tree8d2785c0eac42c0fb99c5126720011d382ee3a96 /Doc/library/packaging.compiler.rst
parentf89ebdc358402588db893e18e4dd31bc8272b7bf (diff)
downloadcpython-4d4b19e294e3748b0e68fec4278d5bde0b0011c8.zip
cpython-4d4b19e294e3748b0e68fec4278d5bde0b0011c8.tar.gz
cpython-4d4b19e294e3748b0e68fec4278d5bde0b0011c8.tar.bz2
Document that packaging doesn’t create __init__.py files (#3902).
The bug reported expected distutils to create an __init__.py file for a project using only C extension modules. IMO, how Python imports packages and submodules is well documented, and it’s never suggested that distutils might create an __init__.py file, so I’m adding this clarification to the packaging docs but won’t backport unless other people tell me they shared the same wrong expectation. Thanks to Mike Hoy for his help with the patch.
Diffstat (limited to 'Doc/library/packaging.compiler.rst')
-rw-r--r--Doc/library/packaging.compiler.rst4
1 files changed, 4 insertions, 0 deletions
diff --git a/Doc/library/packaging.compiler.rst b/Doc/library/packaging.compiler.rst
index d771972..89b6e45 100644
--- a/Doc/library/packaging.compiler.rst
+++ b/Doc/library/packaging.compiler.rst
@@ -675,3 +675,7 @@ extension modules.
| | abort the build process, but | |
| | simply skip the extension. | |
+------------------------+--------------------------------+---------------------------+
+
+To distribute extension modules that live in a package (e.g. ``package.ext``),
+you need to create you need to create a :file:`{package}/__init__.py` file to
+let Python recognize and import your module.