summaryrefslogtreecommitdiffstats
path: root/Lib/packaging
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/packaging')
-rw-r--r--Lib/packaging/run.py20
-rw-r--r--Lib/packaging/tests/test_command_install_data.py1
2 files changed, 9 insertions, 12 deletions
diff --git a/Lib/packaging/run.py b/Lib/packaging/run.py
index ef20f35..5affb17 100644
--- a/Lib/packaging/run.py
+++ b/Lib/packaging/run.py
@@ -290,27 +290,23 @@ def _run(dispatcher, args, **kw):
@action_help("""\
-Usage: pysetup list dist [dist ...]
+Usage: pysetup list [dist ...]
or: pysetup list --help
- or: pysetup list --all
Print name, version and location for the matching installed distributions.
positional arguments:
- dist installed distribution name
-
-optional arguments:
- --all list all installed distributions
+ dist installed distribution name; omit to get all distributions
""")
def _list(dispatcher, args, **kw):
- opts = _parse_args(args[1:], '', ['all'])
+ opts = _parse_args(args[1:], '', [])
dists = get_distributions(use_egg_info=True)
- if 'all' in opts or opts['args'] == []:
- results = dists
- listall = True
- else:
+ if opts['args']:
results = (d for d in dists if d.name.lower() in opts['args'])
listall = False
+ else:
+ results = dists
+ listall = True
number = 0
for dist in results:
@@ -368,7 +364,7 @@ actions = [
('install', 'Install a project', _install),
('remove', 'Remove a project', _remove),
('search', 'Search for a project in the indexes', _search),
- ('list', 'List installed releases', _list),
+ ('list', 'List installed projects', _list),
('graph', 'Display a graph', _graph),
('create', 'Create a project', _create),
('generate-setup', 'Generate a backward-comptatible setup.py', _generate),
diff --git a/Lib/packaging/tests/test_command_install_data.py b/Lib/packaging/tests/test_command_install_data.py
index 0486427..35ce847 100644
--- a/Lib/packaging/tests/test_command_install_data.py
+++ b/Lib/packaging/tests/test_command_install_data.py
@@ -35,6 +35,7 @@ class InstallDataTestCase(support.TempdirManager,
two = os.path.join(pkg_dir, 'two')
self.write_file(two, 'xxx')
+ # FIXME this creates a literal \{inst2\} directory!
cmd.data_files = {one: '{inst}/one', two: '{inst2}/two'}
self.assertCountEqual(cmd.get_inputs(), [one, two])