Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/python3' into fix-return-code
Browse files Browse the repository at this point in the history
  • Loading branch information
git-developer committed Sep 28, 2024
2 parents f4fd910 + af8a442 commit 291546f
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 16 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/appimage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,15 @@ jobs:
printenv | grep ^APPIMAGE_ >>"${GITHUB_ENV}"
- name: Build AppImage
uses: AppImageCrafters/[email protected]
uses: git-developer/[email protected]
with:
recipe: "${{ matrix.base.recipe }}"
command: ${{
format('sh -c "set -eu; {0}; {1}; {2}; appimage-builder --recipe {3}"',
'pip install --upgrade setuptools packaging packaging-legacy',
'pip install --extra-index-url https://lief.s3-website.fr-par.scw.cloud/latest \"lief>=0.16.0.dev0\"',
'find /usr/local/lib -name package.py | while read -r file; do sed -i -e \"s/^from.packaging/&_legacy/\" \"${file}\"; done',
matrix.base.recipe)
}}

- name: Upload artifacts
uses: actions/upload-artifact@v4
Expand Down
9 changes: 7 additions & 2 deletions AppImageBuilder.debian-bullseye.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,13 @@ AppDir:
pip install --target "${TARGET_APPDIR}/usr/lib/python3/dist-packages/" vdf
fi
# python3-usb1 expects 'libusb-1.0.so', see https://github.com/vpelletier/python-libusb1/issues/78
find "${TARGET_APPDIR}" -name 'libusb-1.0.so.[0-9]' | while read -r file; do
path="$(dirname "${file}")"
link="${file%.[0-9]}"
[ -e "${link}" ] || ln -sr "${file}" "${link}"
done
apt:
arch:
- "{{APPIMAGE_APT_ARCH}}"
Expand Down Expand Up @@ -104,8 +111,6 @@ AppDir:

exclude:
# coreutils
- libacl* # filesystem
- libattr* # filesystem
- libgmp* # arithmetics

# gir1.2-rsvg-2.0
Expand Down
19 changes: 15 additions & 4 deletions AppImageBuilder.debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,21 @@ AppDir:
printf '[Settings]\ngtk-icon-theme-name = %s\n' "${theme}" >"${xdg_settings}"
fi
# python3-usb1 expects 'libusb-1.0.so', see https://github.com/vpelletier/python-libusb1/issues/78
find "${TARGET_APPDIR}" -name 'libusb-1.0.so.[0-9]' | while read -r file; do
path="$(dirname "${file}")"
link="${file%.[0-9]}"
[ -e "${link}" ] || ln -sr "${file}" "${link}"
done
# Trixie expects libpixbufloader libs with a dash suffix, not underscore
# see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1082676
find "${TARGET_APPDIR}" -type f -name 'libpixbufloader_*' | while read -r file; do
path="$(dirname "${file}")"
link="${path}/$(echo "$(basename "${file}")" | tr _ -)"
[ -e "${link}" ] || ln -sr "${file}" "${link}"
done
after_runtime: |
set -eu
Expand Down Expand Up @@ -109,8 +124,6 @@ AppDir:

exclude:
# coreutils
- libacl* # filesystem
- libattr* # filesystem
- libgmp* # arithmetics

# gir1.2-rsvg-2.0
Expand All @@ -134,7 +147,6 @@ AppDir:
- libfribidi* # i18n
- libgtk-3-common # gui
- liblz* # codec
- libmount* # filesystem
- libtiff* # codec
- libwebp* # codec

Expand All @@ -156,7 +168,6 @@ AppDir:
- libgprofng* # development
- libjansson* # codec
- libsframe* # development
- libcloudproviders* # networking
- netbase # network
- tzdata # date/time

Expand Down
9 changes: 7 additions & 2 deletions AppImageBuilder.ubuntu-focal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,13 @@ AppDir:
printf '[Settings]\ngtk-icon-theme-name = %s\n' "${theme}" >"${xdg_settings}"
fi
# python3-usb1 expects 'libusb-1.0.so', see https://github.com/vpelletier/python-libusb1/issues/78
find "${TARGET_APPDIR}" -name 'libusb-1.0.so.[0-9]' | while read -r file; do
path="$(dirname "${file}")"
link="${file%.[0-9]}"
[ -e "${link}" ] || ln -sr "${file}" "${link}"
done
apt:
arch:
- "{{APPIMAGE_APT_ARCH}}"
Expand Down Expand Up @@ -108,8 +115,6 @@ AppDir:

exclude:
# coreutils
- libacl* # filesystem
- libattr* # filesystem
- libgmp* # arithmetics

# gir1.2-rsvg-2.0
Expand Down
10 changes: 7 additions & 3 deletions AppImageBuilder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,13 @@ AppDir:
printf '[Settings]\ngtk-icon-theme-name = %s\n' "${theme}" >"${xdg_settings}"
fi
# python3-usb1 expects 'libusb-1.0.so', see https://github.com/vpelletier/python-libusb1/issues/78
find "${TARGET_APPDIR}" -name 'libusb-1.0.so.[0-9]' | while read -r file; do
path="$(dirname "${file}")"
link="${file%.[0-9]}"
[ -e "${link}" ] || ln -sr "${file}" "${link}"
done
after_runtime: |
set -eu
Expand Down Expand Up @@ -111,8 +118,6 @@ AppDir:

exclude:
# coreutils
- libacl* # filesystem
- libattr* # filesystem
- libgmp* # arithmetics

# gir1.2-rsvg-2.0
Expand All @@ -136,7 +141,6 @@ AppDir:
- libfribidi* # i18n
- libgtk-3-common # gui
- liblz* # codec
- libmount* # filesystem
- libtiff* # codec
- libwebp* # codec

Expand Down
7 changes: 4 additions & 3 deletions scc/lib/eudevmonitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,12 @@ class Eudev:
def __init__(self) -> None:
self._ctx = None
try:
self._lib = ctypes.cdll.LoadLibrary("libudev.so")
self._lib = ctypes.cdll.LoadLibrary("libudev.so.1")
except OSError:
self._lib = ctypes.CDLL(find_library(self.LIB_NAME))
if self._lib is None:
lib_name = find_library(self.LIB_NAME)
if lib_name is None:
raise ImportError("No library named udev")
self._lib = ctypes.CDLL(lib_name)
Eudev._setup_lib(self._lib)
self._ctx = self._lib.udev_new()
if self._ctx is None:
Expand Down

0 comments on commit 291546f

Please sign in to comment.