[bpo-45765] Fix distribution discovery on empty path. (GH-29487) (GH-29510)

(cherry picked from commit 6ec0dec7b7b50d4fee5b2b66cf38e4291bcdf44c)

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
2 files changed