Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 04d4a78

Browse files
authored
Merge pull request #19306 from QuLogic/fix-license-check
Fix some packaging issues
2 parents 402fece + 8919d00 commit 04d4a78

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,4 @@ recursive-include tutorials *
2121
include versioneer.py
2222
include lib/matplotlib/_version.py
2323
include tests.py
24+
recursive-exclude lib/matplotlib/backends/web_backend/node_modules *

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)