aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/package_index.py
diff options
context:
space:
mode:
Diffstat (limited to 'setuptools/package_index.py')
-rwxr-xr-xsetuptools/package_index.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/setuptools/package_index.py b/setuptools/package_index.py
index c117cb62..51769cdf 100755
--- a/setuptools/package_index.py
+++ b/setuptools/package_index.py
@@ -138,11 +138,9 @@ def interpret_distro_name(
# versions in distribution archive names (sdist and bdist).
parts = basename.split('-')
- if not py_version:
- for p in parts[2:]:
- if p.match('py\d\.\d'):
- # It's a bdist_dumb, not an sdist -- bail out
- return
+ if not py_version and any(p.match('py\d\.\d') for p in parts[2:]):
+ # it is a bdist_dumb, not an sdist -- bail out
+ return
for p in range(1,len(parts)+1):
yield Distribution(