File tree 1 file changed +7
-2
lines changed
1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -32,12 +32,17 @@ def get_local_dist_metadata_filepath(dist):
32
32
# Dist filename syntax
33
33
# name ["-" version ["-py" pyver ["-" required_platform]]] "." ext
34
34
# https://setuptools.readthedocs.io/en/latest/formats.html#filename-embedded-metadata
35
- filename = '' .join (chain (* takewhile (lambda x : x [1 ], (
35
+
36
+ valid_component = lambda x : x [1 ]
37
+ # Stop taking filename components at the first missing/invalid component
38
+ filename_component = takewhile (valid_component , (
36
39
('' , pkg_resources .to_filename (pkg_resources .safe_name (dist .project_name ))),
37
40
('-' , pkg_resources .to_filename (pkg_resources .safe_version (dist .version ))),
38
41
('-py' , dist .py_version ),
39
42
('-' , dist .platform ),
40
- ))))
43
+ ))
44
+ filename = '' .join (chain (* filename_component ))
45
+
41
46
if isinstance (dist , pkg_resources .EggInfoDistribution ):
42
47
ext = 'egg-info'
43
48
metadata_file = 'PKG-INFO'
You can’t perform that action at this time.
0 commit comments