aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/package_index.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2015-03-20 13:34:15 -0400
committerJason R. Coombs <jaraco@jaraco.com>2015-03-20 13:34:15 -0400
commitedf097e299d4382700f819288cb08390c53e109d (patch)
tree48d39d01244f49383c43804036a5add268266f08 /setuptools/package_index.py
parent00477b5b3e1f42b5ad9cdc553652e04beb675dbb (diff)
downloadexternal_python_setuptools-edf097e299d4382700f819288cb08390c53e109d.tar.gz
external_python_setuptools-edf097e299d4382700f819288cb08390c53e109d.tar.bz2
external_python_setuptools-edf097e299d4382700f819288cb08390c53e109d.zip
Flat is better than nested.
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(