puddletag: switch to pythonRelaxDepsHook

This commit is contained in:
Fabian Affolter 2022-11-04 00:36:32 +01:00
parent f0bb5dcb9b
commit c7dd21dda2

View File

@ -1,4 +1,8 @@
{ lib, fetchFromGitHub, python3Packages, wrapQtAppsHook }:
{ lib
, fetchFromGitHub
, python3
, wrapQtAppsHook
}:
# As of 2.1, puddletag has started pinning versions of all dependencies that it
# was built against which is an issue as the chances of us having the exact same
@ -14,18 +18,11 @@
# ignoring the pinned versions, it's just something we will have to accept
# unless we want to vendor those versions.
let
# NOTE: check if we can drop any of these overrides when bumping the version
overrideVersions = [
"lxml"
"pyparsing"
"pyqt5"
];
in
python3Packages.buildPythonApplication rec {
python3.pkgs.buildPythonApplication rec {
pname = "puddletag";
version = "2.2.0";
format = "setuptools";
src = fetchFromGitHub {
owner = "puddletag";
@ -34,26 +31,29 @@ python3Packages.buildPythonApplication rec {
hash = "sha256-KaFfpOWI9u2ZC/3kuCLneWOOKSmAaIuHPFHptkKMH/g=";
};
pythonRelaxDeps = true;
pythonRemoveDeps = [
"chromaprint"
"pyqt5-qt5"
];
postPatch = ''
substituteInPlace setup.py \
--replace share/pixmaps share/icons
'';
cp requirements.in requirements.txt
sed -i requirements.txt -e 's/^chromaprint$//'
'' + lib.concatMapStringsSep "\n"
(e: ''
sed -i requirements.txt -e 's/^${e}.*/${e}/'
'')
overrideVersions;
nativeBuildInputs = [
python3.pkgs.pythonRelaxDepsHook
wrapQtAppsHook
];
nativeBuildInputs = [ wrapQtAppsHook ];
propagatedBuildInputs = with python3Packages; [
pyacoustid
propagatedBuildInputs = with python3.pkgs; [
configobj
levenshtein
lxml
mutagen
pyacoustid
pyparsing
pyqt5
rapidfuzz