Skip to content

Commit fe4d9f4

Browse files
committed
license: include winpthreads and gcc licenses
1 parent 1bb4155 commit fe4d9f4

File tree

6 files changed

+1339
-10
lines changed

6 files changed

+1339
-10
lines changed

bin/cibw_repair_wheel_licenses.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,14 +84,20 @@ def arg_to_paths(license_file_arg: str) -> tuple[Path, Path]:
8484
index1 = glob1_str.index('*')
8585
part1_glob = glob1_str[:index1]
8686
part2_glob = glob1_str[index1+1:]
87-
path1_str = str(path1)
87+
path1_str = str(path1).replace('\\', '/')
8888
if len(part2_glob) != 0:
8989
wildcard = path1_str[len(part1_glob):-len(part2_glob)]
9090
else:
9191
wildcard = path1_str[len(part1_glob):]
92-
assert path1_str.startswith(part1_glob)
93-
assert path1_str.endswith(part2_glob)
94-
assert path1_str == part1_glob + wildcard + part2_glob
92+
assert path1_str.startswith(part1_glob), (
93+
f"{path1_str} does not start with {part1_glob}"
94+
)
95+
assert path1_str.endswith(part2_glob), (
96+
f"{path1_str} does not end with {part2_glob}"
97+
)
98+
assert path1_str == part1_glob + wildcard + part2_glob, (
99+
f"{path1_str} != {part1_glob} + {wildcard} + {part2_glob}"
100+
)
95101
path2_str = glob2_str.replace('*', wildcard)
96102

97103
return path1, Path(path2_str)

pyproject.toml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -149,12 +149,21 @@ before-build = "pip install wheel delvewheel"
149149
repair-wheel-command = [
150150
"""python bin/cibw_repair_wheel_licenses.py {wheel} \
151151
--license LGPL-3.0-or-later \
152-
--license-file '.local/src/gmp-*/COPYING:python-flint.libs/gmp-*/COPYING' \
153-
--license-file '.local/src/gmp-*/COPYING.LESSERv3:python-flint.libs/gmp-*/COPYING.LESSERv3' \
154-
--license-file '.local/src/mpfr-*/COPYING:python-flint.libs/mpfr-*/COPYING' \
155-
--license-file '.local/src/mpfr-*/COPYING.LESSER:python-flint.libs/mpfr-*/COPYING.LESSER' \
156-
--license-file '.local/src/flint-*/COPYING:python-flint.libs/flint-*/COPYING' \
157-
--license-file '.local/src/flint-*/COPYING.LESSER:python-flint.libs/flint-*/COPYING.LESSER' \
152+
--license-file .local/src/gmp-*/COPYING:python-flint.libs/gmp-*/COPYING \
153+
--license-file .local/src/gmp-*/COPYING.LESSERv3:python-flint.libs/gmp-*/COPYING.LESSERv3 \
154+
--license-file .local/src/mpfr-*/COPYING:python-flint.libs/mpfr-*/COPYING \
155+
--license-file .local/src/mpfr-*/COPYING.LESSER:python-flint.libs/mpfr-*/COPYING.LESSER \
156+
--license-file .local/src/flint-*/COPYING:python-flint.libs/flint-*/COPYING \
157+
--license-file .local/src/flint-*/COPYING.LESSER:python-flint.libs/flint-*/COPYING.LESSER \
158+
\
159+
--license "MIT AND BSD-3-Clause-Clear" \
160+
--license-file wheels/winpthreads/COPYING:python-flint.libs/winpthreads/COPYING \
161+
\
162+
--license "GPL-3.0-or-later WITH GCC-exception-3.1 AND LGPL-2.1-or-later" \
163+
--license-file wheels/gcc/COPYING3:python-flint.libs/gcc/COPYING3 \
164+
--license-file wheels/gcc/COPYING.LIB:python-flint.libs/gcc/COPYING.LIB \
165+
--license-file wheels/gcc/COPYING.RUNTIME:python-flint.libs/gcc/COPYING.RUNTIME \
158166
""",
167+
# Need license file for libgcc_s_seh-1.dll
159168
"delvewheel repair -w {dest_dir} {wheel} --add-path .local/bin",
160169
]

0 commit comments

Comments
 (0)