Skip to content

Commit feaa354

Browse files
committed
Add license files to pyodide wheels
1 parent afe2b14 commit feaa354

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

pyproject.toml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,9 +179,21 @@ repair-wheel-command = [
179179

180180
[tool.cibuildwheel.pyodide]
181181
before-all = "bin/cibw_before_all_pyodide.sh"
182+
before-build = "pip install wheel"
182183
pyodide-version = "0.28.2"
183184
# GMP, MPFR, and FLINT are built as static libraries for Pyodide.
184-
repair-wheel-command = ""
185+
repair-wheel-command = [
186+
"""python bin/cibw_repair_wheel_licenses.py "{wheel}" \
187+
--license LGPL-3.0-or-later \
188+
--license-file 'wasm-library-dir/src/gmp-*/COPYING:python-flint.libs/gmp-*/COPYING' \
189+
--license-file 'wasm-library-dir/src/gmp-*/COPYING.LESSERv3:python-flint.libs/gmp-*/COPYING.LESSERv3' \
190+
--license-file 'wasm-library-dir/src/mpfr-*/COPYING:python-flint.libs/mpfr-*/COPYING' \
191+
--license-file 'wasm-library-dir/src/mpfr-*/COPYING.LESSER:python-flint.libs/mpfr-*/COPYING.LESSER' \
192+
--license-file 'wasm-library-dir/src/flint-*/COPYING:python-flint.libs/flint-*/COPYING' \
193+
--license-file 'wasm-library-dir/src/flint-*/COPYING.LESSER:python-flint.libs/flint-*/COPYING.LESSER' \
194+
""",
195+
"cp \"{wheel}\" \"{dest_dir}\"",
196+
]
185197
test-command = "python -m pytest -svra -p no:cacheprovider --pyargs flint"
186198
test-requires = ["pytest", "hypothesis"]
187199

0 commit comments

Comments
 (0)