|
| 1 | +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 |
| 2 | +From: Ludovic Henry <git@ludovic.dev> |
| 3 | +Date: Tue, 13 Oct 2026 12:00:00 +0200 |
| 4 | +Subject: [PATCH] package the CharLS and pyjpegls licences in the built wheel |
| 5 | + |
| 6 | +Upstream-Status: To upstream [not yet submitted; every pyjpegls wheel on PyPI has the same gap, so it needs a maintainer discussion rather than a drive-by PR] |
| 7 | + |
| 8 | +setup.py compiles lib/charls/src/*.cpp (CharLS, vendored by the |
| 9 | +team-charls/charls submodule pinned at v2.4.2) straight into the |
| 10 | +_CharLS extension, so every wheel redistributes CharLS in binary form. |
| 11 | +Its BSD-3-Clause licence requires the copyright notice to travel with |
| 12 | +the binary, but the repository's only licence text is license.txt |
| 13 | +(lowercase), which carries pyjpegls's own MIT text and nothing for |
| 14 | +CharLS. |
| 15 | + |
| 16 | +Worse, setuptools' default license-files auto-discovery glob |
| 17 | +(LICENSE*/LICENCE*/COPYING*/NOTICE*/AUTHORS*) is case-sensitive on |
| 18 | +Linux and never matches license.txt, so the built wheel ships no |
| 19 | +licence at all, for either project. |
| 20 | + |
| 21 | +Add LICENSE as an uppercase copy of the existing license.txt (MIT, |
| 22 | +verbatim) and LICENSE.charls with the vendored copy's licence text |
| 23 | +(BSD-3-Clause, verbatim from team-charls/charls's LICENSE.md) at the |
| 24 | +project root: setuptools' default glob then picks up both and copies |
| 25 | +them into the wheel's dist-info/licenses/, so no pyproject.toml change |
| 26 | +is needed. |
| 27 | +--- |
| 28 | + LICENSE | 23 +++++++++++++++++++++++ |
| 29 | + LICENSE.charls | 28 ++++++++++++++++++++++++++++ |
| 30 | + 2 files changed, 51 insertions(+) |
| 31 | + create mode 100644 LICENSE |
| 32 | + create mode 100644 LICENSE.charls |
| 33 | + |
| 34 | +diff --git a/LICENSE b/LICENSE |
| 35 | +new file mode 100644 |
| 36 | +index 0000000..03de66a |
| 37 | +--- /dev/null |
| 38 | ++++ b/LICENSE |
| 39 | +@@ -0,0 +1,23 @@ |
| 40 | ++ |
| 41 | ++pyjpegls - JPEG-LS for Python via CharLS C++ Library |
| 42 | ++ |
| 43 | ++The MIT License (MIT) |
| 44 | ++ |
| 45 | ++Copyright (c) 2013 Pierre V. Villeneuve, pierre.villeneuve@gmail.com |
| 46 | ++ |
| 47 | ++Permission is hereby granted, free of charge, to any person obtaining a copy of |
| 48 | ++this software and associated documentation files (the "Software"), to deal in |
| 49 | ++the Software without restriction, including without limitation the rights to |
| 50 | ++use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of |
| 51 | ++the Software, and to permit persons to whom the Software is furnished to do so, |
| 52 | ++subject to the following conditions: |
| 53 | ++ |
| 54 | ++The above copyright notice and this permission notice shall be included in all |
| 55 | ++copies or substantial portions of the Software. |
| 56 | ++ |
| 57 | ++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 58 | ++IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS |
| 59 | ++FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR |
| 60 | ++COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER |
| 61 | ++IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN |
| 62 | ++CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
| 63 | +diff --git a/LICENSE.charls b/LICENSE.charls |
| 64 | +new file mode 100644 |
| 65 | +index 0000000..bbd8e6c |
| 66 | +--- /dev/null |
| 67 | ++++ b/LICENSE.charls |
| 68 | +@@ -0,0 +1,28 @@ |
| 69 | ++CharLS |
| 70 | ++Copyright (c) 2007, Jan de Vaan and Victor Derks |
| 71 | ++All rights reserved. |
| 72 | ++ |
| 73 | ++Redistribution and use in source and binary forms, with or without |
| 74 | ++modification, are permitted provided that the following conditions are met: |
| 75 | ++ |
| 76 | ++1. Redistributions of source code must retain the above copyright notice, this |
| 77 | ++ list of conditions and the following disclaimer. |
| 78 | ++ |
| 79 | ++2. Redistributions in binary form must reproduce the above copyright notice, |
| 80 | ++ this list of conditions and the following disclaimer in the documentation |
| 81 | ++ and/or other materials provided with the distribution. |
| 82 | ++ |
| 83 | ++3. Neither the name of the copyright holder nor the names of its |
| 84 | ++ contributors may be used to endorse or promote products derived from |
| 85 | ++ this software without specific prior written permission. |
| 86 | ++ |
| 87 | ++THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
| 88 | ++AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 89 | ++IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
| 90 | ++DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
| 91 | ++FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| 92 | ++DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
| 93 | ++SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
| 94 | ++CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
| 95 | ++OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 96 | ++OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 97 | +-- |
| 98 | +2.43.0 |
0 commit comments