diff options
Diffstat (limited to 'setuptools/package_index.py')
-rwxr-xr-x | setuptools/package_index.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/setuptools/package_index.py b/setuptools/package_index.py index 5ed19130..51769cdf 100755 --- a/setuptools/package_index.py +++ b/setuptools/package_index.py @@ -138,10 +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 len(p)==5 and p.startswith('py2.'): - return # It's a bdist_dumb, not an sdist -- bail out + 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( |