diff options
Diffstat (limited to 'setuptools/package_index.py')
| -rwxr-xr-x | setuptools/package_index.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 95eb1cf3..cabf1039 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 i,p in enumerate(parts[2:]): - if re.match('py\d\.\d$', p): - # It's a bdist_dumb, not an sdist -- bail out - return + if not py_version and any(re.match('py\d\.\d$', p) 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( |
