File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 2121dist_dir = project_dir / 'dist'
2222license_dir = project_dir / 'LICENSE'
2323
24- license_file_names = [ path .name for path in sorted (license_dir .glob ('*' ))]
24+ license_file_names = { path .name for path in sorted (license_dir .glob ('*' ))}
2525for wheel in dist_dir .glob ('*.whl' ):
2626 print (f'Checking LICENSE files in: { wheel } ' )
2727 with zipfile .ZipFile (wheel ) as f :
28- wheel_license_file_names = [ Path (path ).name
28+ wheel_license_file_names = { Path (path ).name
2929 for path in sorted (f .namelist ())
30- if '.dist-info/LICENSE' in path ]
31- if wheel_license_file_names != license_file_names :
30+ if '.dist-info/LICENSE' in path }
31+ if not (len (wheel_license_file_names ) and
32+ wheel_license_file_names .issuperset (license_file_names )):
3233 print (f'LICENSE file(s) missing:\n '
3334 f'{ wheel_license_file_names } !=\n '
3435 f'{ license_file_names } ' )
You can’t perform that action at this time.
0 commit comments