aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools.txt
diff options
context:
space:
mode:
authorPJ Eby <distutils-sig@python.org>2006-03-17 16:57:23 +0000
committerPJ Eby <distutils-sig@python.org>2006-03-17 16:57:23 +0000
commit92a61578a4b7d09ad6a6f9524163e67b62782e18 (patch)
tree7d6a363dca53ef9f97f625100e9ce1006eb107b7 /setuptools.txt
parent0b0d41cde67414ab19b030ea48b497e17134be19 (diff)
downloadexternal_python_setuptools-92a61578a4b7d09ad6a6f9524163e67b62782e18.tar.gz
external_python_setuptools-92a61578a4b7d09ad6a6f9524163e67b62782e18.tar.bz2
external_python_setuptools-92a61578a4b7d09ad6a6f9524163e67b62782e18.zip
Support namespace packages in conjunction with system packagers, by omitting
the installation of any ``__init__.py`` files for namespace packages, and adding a special ``.pth`` file to create a working package in ``sys.modules``. --HG-- branch : setuptools extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4043119
Diffstat (limited to 'setuptools.txt')
-rwxr-xr-xsetuptools.txt32
1 files changed, 17 insertions, 15 deletions
diff --git a/setuptools.txt b/setuptools.txt
index 0cd40dfb..9067ccd6 100755
--- a/setuptools.txt
+++ b/setuptools.txt
@@ -1225,21 +1225,18 @@ packages), in a normal Python package layout. These ``__init__.py`` files
This code ensures that the namespace package machinery is operating and that
the current package is registered as a namespace package.
-You can include other code and data in a namespace package's ``__init__.py``,
-but it's generally not a great idea because the loading order of each
-project's namespace packages is not guaranteed, and thus the actual contents
-of the parent package at runtime may vary from one machine to another. While
-it's true that you won't have such conflicts if only one project defines the
-contents of a particular namespace package's ``__init__.py``, it's less error-
-prone to just leave ``__init__.py`` empty except for the declaration line.
-
-(Note that this non-deterministic ordering also means that you must include
-the declaration line in the ``__init__.py`` of *every* project that has
-contents for the namespace package in question, in order to ensure that the
-namespace will be declared regardless of which project's copy of
-``__init__.py`` is loaded first. If the first loaded ``__init__.py`` doesn't
-declare it, it will never *be* declared, because no other copies will ever be
-loaded!)
+You must NOT include any other code and data in a namespace package's
+``__init__.py``. Even though it may appear to work during development, or when
+projects are installed as ``.egg`` files, it will not work when the projects
+are installed using "system" packaging tools -- in such cases the
+``__init__.py`` files will not be installed, let alone executed.
+
+You must include the ``declare_namespace()`` line in the ``__init__.py`` of
+*every* project that has contents for the namespace package in question, in
+order to ensure that the namespace will be declared regardless of which
+project's copy of ``__init__.py`` is loaded first. If the first loaded
+``__init__.py`` doesn't declare it, it will never *be* declared, because no
+other copies will ever be loaded!)
TRANSITIONAL NOTE
@@ -2352,6 +2349,11 @@ Release Notes/Change History
----------------------------
0.6a11
+ * Support namespace packages in conjunction with system packagers, by omitting
+ the installation of any ``__init__.py`` files for namespace packages, and
+ adding a special ``.pth`` file to create a working package in
+ ``sys.modules``.
+
* Made ``--single-version-externally-managed`` automatic when ``--root`` is
used, so that most system packagers won't require special support for
setuptools.