Skip to content

Commit

Permalink
tmp fix for conda list export
Browse files Browse the repository at this point in the history
  • Loading branch information
HugoTian committed Aug 18, 2016
1 parent ce75265 commit 342d8cb
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion conda/cli/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ def specs_from_args(args, json=False):
(?P<name>[^=<>!\s]+) # package name
\s* # ignore spaces
(
(?P<cc>=[^=]+(=[^=]+)?) # conda constraint
(?P<cc>=[^=]+(=[^=]+)?(=[^=]+)?) # conda constraint
|
(?P<pc>(?:[=!]=|[><]=?).+) # new (pip-style) constraint(s)
)?
Expand Down
12 changes: 11 additions & 1 deletion conda/cli/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,17 @@ def install(args, parser, command='install'):
specs = []
if args.file:
for fpath in args.file:
specs.extend(common.specs_from_url(fpath, json=args.json))
file_spec= common.specs_from_url(fpath, json=args.json)
for s in file_spec:
part = s.split()
if len(part) < 4 :
specs.append(s)
else:
specs.append(" ".join(part[:3]))
ch = part[3].strip()
index_args["channel_urls"] = list(index_args["channel_urls"])
if ch not in ("defaults", "local"):
index_args["channel_urls"].append(ch)
if '@EXPLICIT' in specs:
explicit(specs, prefix, verbose=not args.quiet, index_args=index_args)
return
Expand Down
2 changes: 1 addition & 1 deletion conda/cli/main_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def list_packages(prefix, installed, regex=None, format='human',
result.append(dist)
continue
if format == 'export':
result.append('='.join(dist2quad(dist)[:3]))
result.append('='.join(dist2quad(dist)))
continue

try:
Expand Down

0 comments on commit 342d8cb

Please sign in to comment.