1
0
mirror of https://github.com/pypiserver/pypiserver synced 2024-11-09 16:45:51 +01:00

Merge pull request #85 from asottile/more_deterministic_sort

More deterministic sort of packages
This commit is contained in:
Kostis Anagnostopoulos 2015-07-21 22:11:39 +03:00
commit 3665270197

@ -297,7 +297,7 @@ def simple(prefix=""):
if not fp.endswith("/"):
fp += "/"
files = [x.relfn for x in sorted(find_packages(packages(), prefix=prefix), key=lambda x: x.parsed_version)]
files = [x.relfn for x in sorted(find_packages(packages(), prefix=prefix), key=lambda x: (x.parsed_version, x.relfn))]
if not files:
if config.redirect_to_fallback:
return redirect("%s/%s/" % (config.fallback_url.rstrip("/"), prefix))