@@ -156,26 +156,31 @@ Building debs for Python projects
156156Multi-version Installs
157157======================
158158
159- ::
160-
161- FIXME
162-
163159easy_install allows simultaneous installation of different versions of the same
164- package inte a single environment shared by multiple programs which must
165- ``require `` the appropriate version of the package at run time. In general,
166- virtual environments fulfill this need without the complication of the
167- ``require `` directive.
168-
169- The major limitation of ``require `` is that the first time you call it, it
170- locks in the *default * version of everything which is available on sys.path,
171- and ``setuptools `` created command line scripts call it by default. This
172- means that, for example, you can't use ``require `` tests invoked through
173- ``nose `` or a WSGI application invoked through ``gunicorn `` if your
174- application needs a non-default version of anything - the script wrapper
175- for the main application will lock in the version that is available by
176- default, so the subsequent ``require `` call fails with a spurious version
177- conflict.
178-
160+ package into a single environment shared by multiple programs which must
161+ ``require `` the appropriate version of the package at run time (using
162+ ``pkg_resources ``).
163+
164+ For many use cases, virtual environments address this need without the
165+ complication of the ``require `` directive. However, the advantage of
166+ parallel installations within the same environment is that it works for an
167+ environment shared by multiple applications, such as the system Python in a
168+ Linux distribution.
169+
170+ The major limitation of ``pkg_resources `` based parallel installation is
171+ that as soon as you import ``pkg_resources `` it locks in the *default *
172+ version of everything which is already available on sys.path. This can
173+ cause problems, since ``setuptools `` created command line scripts
174+ use ``pkg_resources `` to find the entry point to execute. This means that,
175+ for example, you can't use ``require `` tests invoked through ``nose `` or a
176+ WSGI application invoked through ``gunicorn `` if your application needs a
177+ non-default version of anything that is available on the standard
178+ ``sys.path `` - the script wrapper for the main application will lock in the
179+ version that is available by default, so the subsequent ``require `` call
180+ in your own code fails with a spurious version conflict.
181+
182+ Refer to the `pkg_resources documentation <http://pythonhosted.org/setuptools/pkg_resources.html#workingset-objects >`__
183+ for more details.
179184
180185
181186.. _`Dependency Resolution` :
0 commit comments