Skip to content

Commit 671ca84

Browse files
committed
Fix some snap build warnings
1 parent 8c64893 commit 671ca84

3 files changed

Lines changed: 18 additions & 3 deletions

File tree

packaging/appimage/build-appimage.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,10 @@ python -m python_appimage build app \
2424
APPDIR="entrypoint.py-${ARCH}"
2525
[ -d "${APPDIR}" ] || { echo "AppDir not found: ${APPDIR}"; exit 1; }
2626

27-
# Install tempren (with video extras) into the AppDir's Python
28-
"${APPDIR}/usr/bin/python${PYTHON_VERSION}" -m pip install --quiet \
27+
# Install tempren (with video extras) into the AppDir's Python.
28+
# PYTHONNOUSERSITE=1 prevents pip from treating host ~/.local packages as
29+
# already satisfied and skipping their installation into the AppDir.
30+
PYTHONNOUSERSITE=1 "${APPDIR}/usr/bin/python${PYTHON_VERSION}" -m pip install --quiet \
2931
"tempren[video]==${VERSION}"
3032

3133
# Patch AppRun to invoke tempren instead of starting a bare Python interpreter
@@ -55,6 +57,9 @@ SYSTEM_MAGIC_DB="/usr/share/misc/magic.mgc"
5557
sed -i '2i export LD_LIBRARY_PATH="${APPDIR}/usr/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"' \
5658
"${APPDIR}/AppRun"
5759

60+
# Prevent host user site-packages from leaking into the bundled Python
61+
sed -i '2a export PYTHONNOUSERSITE=1' "${APPDIR}/AppRun"
62+
5863
# Download appimagetool and pack the final AppImage
5964
# APPIMAGE_EXTRACT_AND_RUN avoids FUSE dependency on GitHub-hosted runners
6065
wget -q "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-${ARCH}.AppImage" \

packaging/snap/snapcraft.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,22 @@ summary: Template-based file renaming utility
44
base: core24
55
adopt-info: tempren
66
source-code: https://github.com/idle-code/tempren.git
7+
issues: https://github.com/idle-code/tempren/issues
8+
website: https://github.com/idle-code/tempren
9+
contact: p.z.idlecode@gmail.com
10+
license: GPL-3.0-or-later
711
description: |
812
tempren is a powerful file renaming utility that uses flexible template expressions to generate names for your files.
913
Tag templates can modify original filename, extract metadata from the files or anything in between.
1014
A rich library of built-in tags helps with working with many common file types out-of-the-box.
1115
grade: stable
1216
confinement: strict
17+
18+
lint:
19+
ignore:
20+
# pymediainfo loads libmediainfo via ctypes — no ELF linkage, so the
21+
# library linter cannot detect the dependency.
22+
- "library:usr/lib/*/libmediainfo.so*"
1323
platforms:
1424
amd64:
1525
arm64:

tempren/discovery.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def visit_types_in_package(
7474
except (NotImplementedError, ModuleNotFoundError) as exc:
7575
log.warning(f"Module {name} is currently unsupported: {exc}")
7676
except Exception as exc:
77-
log.error(exc, f"Could not load module {name}")
77+
log.error("Could not load module %s: %s", name, exc)
7878

7979

8080
def visit_types_in_module(

0 commit comments

Comments
 (0)