Created attachment 252321 [details] Update to 6.1.0, +pep517, +pytest I'm working on importing new python ports that required latest version of pymediainfo. There is my sugestion: - Switch to pep517 build - Add pytest NOTES: tests run ok after fixing "accentué.txt" file that it is installed as "accentu?.txt" from src: tests/test_pymediainfo.py: self.media_info = MediaInfo.parse(os.path.join(data_dir, "accentué.txt")) fixed in port: post-install: ${MV} ${WRKSRC}/tests/data/accentu\?.txt ${WRKSRC}/tests/data/accentué.txt Maybe this issue must be discussed at upstream as it appears to be a packaging problem (?).
(In reply to Nuno Teixeira from comment #0) I haven't had time to look too deeply into the issue, but I noticed your proposed fix operates in WRKSRC only, so post-extract might be more appropriate. But either way, could you share the failure messages you get without the fix present as well as the locale you're using? Especially the latter aspect might provide some insight: % tar tf pymediainfo-6.1.0.tar.gz | grep acc pymediainfo-6.1.0/tests/data/accentué.txt % LANG=C tar tf pymediainfo-6.1.0.tar.gz | grep acc pymediainfo-6.1.0/tests/data/accentu\303\251.txt
(In reply to Martin Neubauer from comment #1) Hello Martin, poudriere interactive jail: (LANG=C.UTF-8 is shown in enviroment) nobody@15amd64-main:/usr/ports/multimedia/py-pymediainfo $ LANG=C.UTF-8 tar tf /distfiles/pymediainfo-6.1.0.tar.gz | grep acc pymediainfo-6.1.0/tests/data/accentué.txt nobody@15amd64-main:/usr/ports/multimedia/py-pymediainfo $ LANG=C tar tf /distfiles/pymediainfo-6.1.0.tar.gz | grep acc pymediainfo-6.1.0/tests/data/accentu?.txt Without the post-install hack, tests fail with: > raise FileNotFoundError(filename) E FileNotFoundError: /wrkdirs/usr/ports/multimedia/py-pymediainfo/work-py311/pymediainfo-6.1.0/tests/data/accentué.txt It seems that while default poudriere LANG is C.UTF-8, somehow it istalls using C. I will try to force LANG in port to check if it helps.
(In reply to Nuno Teixeira from comment #2) (...) + USE_LOCALE= C.UTF-8 doesn't help
Created attachment 252334 [details] Update to 6.1.0, +pep517, +pytest, +fix UTF extract Apply fix as in lang/go-devel: # Upstream archive contains files with UTF-8 names EXTRACT_CMD= ${SETENV} LC_ALL=en_US.UTF-8 ${TAR} Using C.UTF-8 instead of en_US.UTF-8
(In reply to Nuno Teixeira from comment #4) Thanks, that looks like properly handling the issue. LGTM
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=6cffdc259b6d5e0d52d61398d170e6541c0ba790 commit 6cffdc259b6d5e0d52d61398d170e6541c0ba790 Author: Nuno Teixeira <eduardo@FreeBSD.org> AuthorDate: 2024-07-28 22:56:27 +0000 Commit: Nuno Teixeira <eduardo@FreeBSD.org> CommitDate: 2024-07-28 22:56:27 +0000 multimedia/py-pymediainfo: Update to 6.1.0 - Switch to DISTVERSION - Switch to pep517 build - Add tests ChangeLog: https://github.com/sbraz/pymediainfo/releases PR: 280468 multimedia/py-pymediainfo/Makefile | 14 +++++++++----- multimedia/py-pymediainfo/distinfo | 6 +++--- 2 files changed, 12 insertions(+), 8 deletions(-)
I will continue to search if this is the best way to deal with UTF file names. If I found a better way then I reopen PR. Committed, thanks!