8000 Fix license verification in wheels. · matplotlib/matplotlib@8919d00 · GitHub
[go: up one dir, main page]

Skip to content
< 8000 header class="HeaderMktg header-logged-out js-details-container js-header Details f4 py-3" role="banner" data-is-top="true" data-color-mode=light data-light-theme=light data-dark-theme=dark>

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 8919d00

Browse files
committed
Fix license verification in wheels.
1 parent ed514e4 commit 8919d00

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

ci/check_wheel_licenses.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,15 @@
2121
dist_dir = project_dir / 'dist'
2222
license_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('*'))}
2525
for 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}')

0 commit comments

Comments
 (0)
0