From 36efeac21a63d82da055378c49adb8e01b4efe65 Mon Sep 17 00:00:00 2001 From: aszlig Date: Thu, 29 Nov 2018 03:51:06 +0100 Subject: [PATCH] beets: Add patch to fix Python 3.7 compatibility Since 0f38d9669ffd74991b65a9c40cdbcf2a98438d1f, the default Python version for Python 3 is now Python 3.7. It has been a while since beets had a new release, but the fix for Python 3.7 is already in master (and it's also rather small), so I decided to cherry-pick the commit as a patch. I've built the package along with its tests and they failed at first, but the errors were unrelated. So I disabled the tests for pylint, as they're failing right now. In addition I also needed to temporarily revert 0d2f06ae3a1f8347dc09cd0dfe6d12b757368e4d, which supposedly should fix issues with Python 2 but aparently breaks Python 3 support and during the beets tests we get a ModuleNotFoundError for the "_gi_gst" module. However I didn't further investigate why this happens, as I'm time constrained right now. But after disabling the pylint tests and the revert of the mentioned gst-python commit, the beets tests succeed. Signed-off-by: aszlig Cc: @jtojnar, @lopsided98 (for introducing the gst-python change) Cc: @domenkozar, @pjones (other beets maintainers) --- pkgs/tools/audio/beets/default.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkgs/tools/audio/beets/default.nix b/pkgs/tools/audio/beets/default.nix index 8f0cc6c4f5c..1cba381a57b 100644 --- a/pkgs/tools/audio/beets/default.nix +++ b/pkgs/tools/audio/beets/default.nix @@ -1,5 +1,6 @@ { stdenv, fetchFromGitHub, writeScript, glibcLocales, diffPlugins , pythonPackages, imagemagick, gobjectIntrospection, gst_all_1 +, fetchpatch # Attributes needed for tests of the external plugins , callPackage, beets @@ -155,6 +156,14 @@ in pythonPackages.buildPythonApplication rec { patches = [ ./replaygain-default-bs1770gain.patch ./keyfinder-default-bin.patch + + # Fix Python 3.7 compatibility + (fetchpatch { + url = "https://github.com/beetbox/beets/commit/" + + "15d44f02a391764da1ce1f239caef819f08beed8.patch"; + sha256 = "12rjb4959nvnrm3fvvki7chxjkipa0cy8i0yi132xrcn8141dnpm"; + excludes = [ "docs/changelog.rst" ]; + }) ]; postPatch = ''