Skip to content

Commit

Permalink
Stable results for matches
Browse files Browse the repository at this point in the history
  • Loading branch information
do3cc committed Mar 25, 2016
1 parent 1a7e5d8 commit 2018b6e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/z3c/autoinclude/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def distributionForDottedName(package_dottedname):
continue
partial_matches.append((dist, ns_packages))

valid_dists_for_package = full_matches + partial_matches
valid_dists_for_package = full_matches + sorted(partial_matches)

if len(valid_dists_for_package) == 0:
raise LookupError("No distributions found for package `%s`; are you sure it is importable?" % package_dottedname)
Expand Down
2 changes: 1 addition & 1 deletion src/z3c/autoinclude/utils.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ by having been extended by nested packages) it should find a package::

>>> import enolp
>>> distributionForPackage(enolp)
enolp.ppa.foo 0.1 (...enolp.ppa.foo-0.1...egg)
enolp.ppa.bar 0.1 (...enolp.ppa.bar-0.1...egg)

While we're at it, it should also find the correct distribution for
packages that have mixed cases::
Expand Down

0 comments on commit 2018b6e

Please sign in to comment.