diff options
author | Éric Araujo <merwok@netwok.org> | 2011-10-21 13:52:10 (GMT) |
---|---|---|
committer | Éric Araujo <merwok@netwok.org> | 2011-10-21 13:52:10 (GMT) |
commit | 3764a964ca4e8c979743ba8c2f08b65ddf8b0070 (patch) | |
tree | 704c88662e85d481a54086689dc95c79989e542a /Doc | |
parent | 04d5bc00a219860c69ea17eaa633d3ab9917409f (diff) | |
parent | 89d3a69d831971d91eab7f799d8c406b00e3f575 (diff) | |
download | cpython-3764a964ca4e8c979743ba8c2f08b65ddf8b0070.zip cpython-3764a964ca4e8c979743ba8c2f08b65ddf8b0070.tar.gz cpython-3764a964ca4e8c979743ba8c2f08b65ddf8b0070.tar.bz2 |
Banch merge
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/packaging.compiler.rst | 4 | ||||
-rw-r--r-- | Doc/packaging/setupscript.rst | 4 |
2 files changed, 8 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. diff --git a/Doc/packaging/setupscript.rst b/Doc/packaging/setupscript.rst index dbac3dd..cafde20 100644 --- a/Doc/packaging/setupscript.rst +++ b/Doc/packaging/setupscript.rst @@ -177,6 +177,10 @@ resulting object code are identical in both cases; the only difference is where in the filesystem (and therefore where in Python's namespace hierarchy) the resulting extension lives. +If your distribution contains only one or more extension modules in a package, +you need to create a :file:`{package}/__init__.py` file anyway, otherwise Python +won't be able to import anything. + If you have a number of extensions all in the same package (or all under the same base package), use the :option:`ext_package` keyword argument to :func:`setup`. For example, :: |