mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-10-14 08:31:40 +03:00
quodlibet: clean up, alternative fix for Python 3.12 (#326924)
* quodlibet: remove option that no longer exists
Upstream removed this at 53c05c1160
* quodlibet: convert to pyproject
* quodlibet: reformat for RFC166
* quodlibet: fixes for Python 3.12
This commit is contained in:
parent
8a70f1bb8d
commit
87c250d7c9
@ -1,56 +1,60 @@
|
||||
{ lib
|
||||
, fetchFromGitHub
|
||||
, tag ? ""
|
||||
{
|
||||
lib,
|
||||
fetchFromGitHub,
|
||||
fetchpatch,
|
||||
tag ? "",
|
||||
|
||||
# build time
|
||||
, gettext
|
||||
, gobject-introspection
|
||||
, wrapGAppsHook3
|
||||
gettext,
|
||||
gobject-introspection,
|
||||
wrapGAppsHook3,
|
||||
|
||||
# runtime
|
||||
, adwaita-icon-theme
|
||||
, gdk-pixbuf
|
||||
, glib
|
||||
, glib-networking
|
||||
, gtk3
|
||||
, gtksourceview
|
||||
, kakasi
|
||||
, keybinder3
|
||||
, libappindicator-gtk3
|
||||
, libmodplug
|
||||
, librsvg
|
||||
, libsoup
|
||||
, webkitgtk
|
||||
adwaita-icon-theme,
|
||||
gdk-pixbuf,
|
||||
glib,
|
||||
glib-networking,
|
||||
gtk3,
|
||||
gtksourceview,
|
||||
kakasi,
|
||||
keybinder3,
|
||||
libappindicator-gtk3,
|
||||
libmodplug,
|
||||
librsvg,
|
||||
libsoup,
|
||||
webkitgtk,
|
||||
|
||||
# optional features
|
||||
, withDbusPython ? false
|
||||
, withMusicBrainzNgs ? false
|
||||
, withPahoMqtt ? false
|
||||
, withPyInotify ? false
|
||||
, withPypresence ? false
|
||||
, withSoco ? false
|
||||
withDbusPython ? false,
|
||||
withMusicBrainzNgs ? false,
|
||||
withPahoMqtt ? false,
|
||||
withPypresence ? false,
|
||||
withSoco ? false,
|
||||
|
||||
# backends
|
||||
, withGstPlugins ? withGstreamerBackend
|
||||
, withGstreamerBackend ? true
|
||||
, gst_all_1
|
||||
, withXineBackend ? true
|
||||
, xine-lib
|
||||
withGstPlugins ? withGstreamerBackend,
|
||||
withGstreamerBackend ? true,
|
||||
gst_all_1,
|
||||
withXineBackend ? true,
|
||||
xine-lib,
|
||||
|
||||
# tests
|
||||
, dbus
|
||||
, glibcLocales
|
||||
, hicolor-icon-theme
|
||||
, python3
|
||||
, xvfb-run
|
||||
dbus,
|
||||
glibcLocales,
|
||||
hicolor-icon-theme,
|
||||
python3,
|
||||
xvfb-run,
|
||||
}:
|
||||
|
||||
python3.pkgs.buildPythonApplication rec {
|
||||
pname = "quodlibet${tag}";
|
||||
version = "4.6.0";
|
||||
format = "pyproject";
|
||||
pyproject = true;
|
||||
|
||||
outputs = [ "out" "doc" ];
|
||||
outputs = [
|
||||
"out"
|
||||
"doc"
|
||||
];
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "quodlibet";
|
||||
@ -59,17 +63,36 @@ python3.pkgs.buildPythonApplication rec {
|
||||
hash = "sha256-dkO/CFN7Dk72xhtmcSDcwUciOPMeEjQS2mch+jSfiII=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
name = "python-3.12-startup.patch";
|
||||
url = "https://patch-diff.githubusercontent.com/raw/quodlibet/quodlibet/pull/4358.patch";
|
||||
hash = "sha256-3IjtAX2mKO/Xi/iTwT5WBD5CMTRYFED7XMm/cx+29Zc=";
|
||||
})
|
||||
(fetchpatch {
|
||||
name = "more-python-3.12-fixes.patch";
|
||||
url = "https://patch-diff.githubusercontent.com/raw/quodlibet/quodlibet/pull/4364.patch";
|
||||
hash = "sha256-VRIQ+4e+X0kjZYuxV2wEjrFr+x5biwBtIR50K6hSfCY=";
|
||||
excludes = [ "poetry.lock" ];
|
||||
})
|
||||
./fix-gdist-python-3.12.patch
|
||||
];
|
||||
|
||||
build-system = [ python3.pkgs.setuptools ];
|
||||
|
||||
nativeBuildInputs =
|
||||
[
|
||||
gettext
|
||||
gobject-introspection
|
||||
wrapGAppsHook3
|
||||
] ++ (with python3.pkgs; [
|
||||
]
|
||||
++ (with python3.pkgs; [
|
||||
sphinx-rtd-theme
|
||||
sphinxHook
|
||||
setuptools
|
||||
]);
|
||||
|
||||
buildInputs = [
|
||||
buildInputs =
|
||||
[
|
||||
adwaita-icon-theme
|
||||
gdk-pixbuf
|
||||
glib
|
||||
@ -82,19 +105,25 @@ python3.pkgs.buildPythonApplication rec {
|
||||
libmodplug
|
||||
libsoup
|
||||
webkitgtk
|
||||
] ++ lib.optionals (withXineBackend) [
|
||||
xine-lib
|
||||
] ++ lib.optionals (withGstreamerBackend) (with gst_all_1; [
|
||||
]
|
||||
++ lib.optionals (withXineBackend) [ xine-lib ]
|
||||
++ lib.optionals (withGstreamerBackend) (
|
||||
with gst_all_1;
|
||||
[
|
||||
gst-plugins-base
|
||||
gstreamer
|
||||
] ++ lib.optionals (withGstPlugins) [
|
||||
]
|
||||
++ lib.optionals (withGstPlugins) [
|
||||
gst-libav
|
||||
gst-plugins-bad
|
||||
gst-plugins-good
|
||||
gst-plugins-ugly
|
||||
]);
|
||||
]
|
||||
);
|
||||
|
||||
propagatedBuildInputs = with python3.pkgs; [
|
||||
dependencies =
|
||||
with python3.pkgs;
|
||||
[
|
||||
feedparser
|
||||
gst-python
|
||||
mutagen
|
||||
@ -104,23 +133,25 @@ python3.pkgs.buildPythonApplication rec {
|
||||
++ lib.optionals withDbusPython [ dbus-python ]
|
||||
++ lib.optionals withMusicBrainzNgs [ musicbrainzngs ]
|
||||
++ lib.optionals withPahoMqtt [ paho-mqtt ]
|
||||
++ lib.optionals withPyInotify [ pyinotify ]
|
||||
++ lib.optionals withPypresence [ pypresence ]
|
||||
++ lib.optionals withSoco [ soco ];
|
||||
|
||||
nativeCheckInputs = [
|
||||
nativeCheckInputs =
|
||||
[
|
||||
dbus
|
||||
gdk-pixbuf
|
||||
glibcLocales
|
||||
hicolor-icon-theme
|
||||
xvfb-run
|
||||
] ++ (with python3.pkgs; [
|
||||
]
|
||||
++ (with python3.pkgs; [
|
||||
polib
|
||||
pytest
|
||||
pytest-xdist
|
||||
]);
|
||||
|
||||
pytestFlags = [
|
||||
pytestFlags =
|
||||
[
|
||||
# missing translation strings in potfiles
|
||||
"--deselect=tests/test_po.py::TPOTFILESIN::test_missing"
|
||||
# require networking
|
||||
@ -128,7 +159,8 @@ python3.pkgs.buildPythonApplication rec {
|
||||
"--deselect=tests/test_browsers_iradio.py::TInternetRadio::test_click_add_station"
|
||||
# upstream does actually not enforce source code linting
|
||||
"--ignore=tests/quality"
|
||||
] ++ lib.optionals (withXineBackend || !withGstPlugins) [
|
||||
]
|
||||
++ lib.optionals (withXineBackend || !withGstPlugins) [
|
||||
"--ignore=tests/plugin/test_replaygain.py"
|
||||
];
|
||||
|
||||
@ -171,6 +203,9 @@ python3.pkgs.buildPythonApplication rec {
|
||||
'';
|
||||
homepage = "https://quodlibet.readthedocs.io/en/latest";
|
||||
license = licenses.gpl2Plus;
|
||||
maintainers = with maintainers; [ coroa pbogdan ];
|
||||
maintainers = with maintainers; [
|
||||
coroa
|
||||
pbogdan
|
||||
];
|
||||
};
|
||||
}
|
||||
|
@ -0,0 +1,23 @@
|
||||
From b3980cf4c8766815e4c13ee1695cebfbf473a2e6 Mon Sep 17 00:00:00 2001
|
||||
From: Pavel Sobolev <contact@paveloom.dev>
|
||||
Date: Sun, 14 Jul 2024 11:30:11 +0300
|
||||
Subject: [PATCH] Import `setuptools` before importing `distutils`.
|
||||
|
||||
---
|
||||
gdist/__init__.py | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/gdist/__init__.py b/gdist/__init__.py
|
||||
index 71814af49..a54aac653 100644
|
||||
--- a/gdist/__init__.py
|
||||
+++ b/gdist/__init__.py
|
||||
@@ -31,6 +31,7 @@ Also supports setuptools but needs to be imported after setuptools
|
||||
(which does some monkey patching)
|
||||
"""
|
||||
|
||||
+import setuptools
|
||||
import sys
|
||||
|
||||
from distutils.core import setup
|
||||
--
|
||||
2.45.2
|
@ -33201,7 +33201,6 @@ with pkgs;
|
||||
withDbusPython = true;
|
||||
withMusicBrainzNgs = true;
|
||||
withPahoMqtt = true;
|
||||
withPyInotify = true;
|
||||
withPypresence = true;
|
||||
withSoco = true;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user