summary refs log tree commit diff
path: root/gnu/packages/games.scm
diff options
context:
space:
mode:
authorTobias Geerinckx-Rice <me@tobias.gr>2020-08-19 23:01:56 +0200
committerTobias Geerinckx-Rice <me@tobias.gr>2020-08-19 23:02:26 +0200
commit4c7d16c5516211f73cef06b39ade8022acb96f23 (patch)
treef43543ad982e021e98a4a1e5bd911e9ed46b6d68 /gnu/packages/games.scm
parent5c83e8ec111f30c3754107ac0ec6fa4db5411fb8 (diff)
downloadguix-4c7d16c5516211f73cef06b39ade8022acb96f23.tar.gz
gnu: unknown-horizons: Fix build with python@3.8 and python-pytest@5.
* gnu/packages/games.scm (unknown-horizons)[source]: Add patch.
[arguments]: Add a ‘fix-tests-with-pytest>=4’ phase.
[native-inputs]: Add python-distro.
* gnu/packages/patches/unknown-horizons-python-3.8-distro.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
Diffstat (limited to 'gnu/packages/games.scm')
-rw-r--r--gnu/packages/games.scm12
1 files changed, 11 insertions, 1 deletions
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm
index a789fced63..0f01267827 100644
--- a/gnu/packages/games.scm
+++ b/gnu/packages/games.scm
@@ -3541,7 +3541,8 @@ also available.")
               (file-name (string-append name "-" version ".tar.gz"))
               (sha256
                (base32
-                "1n747p7h0qp48szgp262swg0xh8kxy1bw8ag1qczs4i26hyzs5x4"))))
+                "1n747p7h0qp48szgp262swg0xh8kxy1bw8ag1qczs4i26hyzs5x4"))
+              (patches (search-patches "unknown-horizons-python-3.8-distro.patch"))))
     (build-system python-build-system)
     (arguments
      '(#:phases
@@ -3564,6 +3565,14 @@ also available.")
                                  (assoc-ref outputs "out")
                                  "/share/unknown-horizons\")"))))
              #t))
+         (add-before 'check 'fix-tests-with-pytest>=4
+           (lambda _
+             (substitute* "tests/conftest.py"
+               (("pytest_namespace")
+                "pytest_configure")
+               (("get_marker")
+                "get_closest_marker"))
+             #t))
          ;; TODO: Run GUI tests as well
          (replace 'check
            (lambda _
@@ -3582,6 +3591,7 @@ also available.")
        ("python-pyyaml" ,python-pyyaml)))
     (native-inputs
      `(("intltool" ,intltool)
+       ("python-distro" ,python-distro)
 
        ;; Required for tests
        ("python-greenlet" ,python-greenlet)