summaryrefslogtreecommitdiff
path: root/api_tests.txt
diff options
context:
space:
mode:
authorPJ Eby <distutils-sig@python.org>2005-10-17 02:26:39 +0000
committerPJ Eby <distutils-sig@python.org>2005-10-17 02:26:39 +0000
commit3df2aabcc056e6d001355d4cec780437387ac4fa (patch)
treee931e6f30fe51eb6ee968a008e9ac4c439249ea8 /api_tests.txt
parentc23b0fb2bfbd8df35ebee9551458ed00e0f2095c (diff)
downloadpython-setuptools-git-3df2aabcc056e6d001355d4cec780437387ac4fa.tar.gz
Significantly enhanced support and docs for "non-root" installation,
including both "virtual" and PYTHONPATH-based installs. The activation precedence of distributions has also changed so that PYTHONPATH-based non-root installs can include eggs that override system-defined packages (whether managed or unmanaged). This version should eliminate most common installation complaints from non-root Python users. Note: this version includes a hacked 'site.py' to support processing .pth files in directories that come *before* site-packages on sys.path. However, because of its placement, it should only come into play when a user puts the setuptools .egg file *directly* on PYTHONPATH, so it doesn't affect "virtual" or "root" installations. It's strictly to provide support for luddites who refuse to give up their existing non-root PYTHONPATH setup unless you pry it from their cold, dead hands. :) --HG-- branch : setuptools extra : convert_revision : svn%3A6015fed2-1504-0410-9fe1-9d1591cc4771/sandbox/trunk/setuptools%4041262
Diffstat (limited to 'api_tests.txt')
-rwxr-xr-xapi_tests.txt10
1 files changed, 5 insertions, 5 deletions
diff --git a/api_tests.txt b/api_tests.txt
index ae5392ba..25f3193f 100755
--- a/api_tests.txt
+++ b/api_tests.txt
@@ -182,12 +182,12 @@ once)::
['...example.com...', '...pkg_resources...', '...pkg_resources...']
And you can specify the path entry a distribution was found under, using the
-optional second parameter to ``add()``
+optional second parameter to ``add()``::
+ >>> ws = WorkingSet([])
>>> ws.add(dist,"foo")
- >>> ws.add(dist,"bar")
>>> ws.entries
- ['http://example.com/something', ..., 'foo', 'bar']
+ ['foo']
But even if a distribution is found under multiple path entries, it still only
shows up once when iterating the working set:
@@ -222,14 +222,14 @@ again for new distributions added thereafter::
>>> def added(dist): print "Added", dist
>>> ws.subscribe(added)
Added Bar 0.9
- >>> foo12 = Distribution(project_name="Foo", version="1.2")
+ >>> foo12 = Distribution(project_name="Foo", version="1.2", location="f12")
>>> ws.add(foo12)
Added Foo 1.2
Note, however, that only the first distribution added for a given project name
will trigger a callback, even during the initial ``subscribe()`` callback::
- >>> foo14 = Distribution(project_name="Foo", version="1.4")
+ >>> foo14 = Distribution(project_name="Foo", version="1.4", location="f14")
>>> ws.add(foo14) # no callback, because Foo 1.2 is already active
>>> ws = WorkingSet([])