summaryrefslogtreecommitdiff
path: root/setuptools/package_index.py
diff options
context:
space:
mode:
Diffstat (limited to 'setuptools/package_index.py')
-rw-r--r--setuptools/package_index.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/setuptools/package_index.py b/setuptools/package_index.py
index 1300b406..bef2ef81 100644
--- a/setuptools/package_index.py
+++ b/setuptools/package_index.py
@@ -165,7 +165,14 @@ def interpret_distro_name(
# it is a bdist_dumb, not an sdist -- bail out
return
- p = len(parts) - 1
+ # find the pivot (p) that splits the name from the version.
+ # infer the version as the first item that has a digit.
+ for p in range(len(parts)):
+ if parts[p][:1].isdigit():
+ break
+ else:
+ p = len(parts)
+
yield Distribution(
location, metadata, '-'.join(parts[:p]), '-'.join(parts[p:]),
py_version=py_version, precedence=precedence,