~ruther/guix-local

74895932af4ec4b9e139f4297ee5b1e019d222e2 — Sharlatan Hellseher 8 months ago 0a37b21
gnu: python-pyxdg: Update to 0.28.

* gnu/packages/freedesktop.scm (python-pyxdg): Update to 0.28.
  [build-system]: Use pypproject.
  [arguments] <test-flags>: Skip 2 tests with Pytest "--deselect" option.
  <phases>: Use default 'check; add 'pre-check.
  [native-inputs]: Remove python-nose; add python-pytest and
  python-setuptools.

Change-Id: Ic870ffa65d992e985563d832c9464aade3a27f82
1 files changed, 19 insertions(+), 26 deletions(-)

M gnu/packages/freedesktop.scm
M gnu/packages/freedesktop.scm => gnu/packages/freedesktop.scm +19 -26
@@ 1372,40 1372,33 @@ For information about libevdev, see:
(define-public python-pyxdg
  (package
    (name "python-pyxdg")
    (version "0.27")
    (version "0.28")
    (source
     (origin
       (method url-fetch)
       (uri (pypi-uri "pyxdg" version))
       (sha256
        (base32
         "19f5j5mxp7ff0vp33s32qbpdi65iiwha0bj641gl70pdwnm97gc0"))))
    (build-system python-build-system)
         "1d48bqwkbnpid80cpwz6h62i112laxl0ivpj58hdyd79fhqbnrrj"))))
    (build-system pyproject-build-system)
    (arguments
     '(#:phases
       (modify-phases %standard-phases
         (replace 'check
           (lambda* (#:key inputs #:allow-other-keys)
             (setenv "XDG_DATA_DIRS"
                     (string-append (assoc-ref inputs "shared-mime-info")
                                    "/share/"))
             (substitute* "test/test-icon.py"
               (("/usr/share/icons/hicolor/index.theme")
                (string-append (assoc-ref inputs "hicolor-icon-theme")
                               "/share/icons/hicolor/index.theme")))

             ;; These two tests are known to fail in strange ways.
             (substitute* "test/test-mime.py"
               (("def test_get_type\\(self") "def _test_get_type(self")
               (("def test_get_type2\\(self") "def _test_get_type2(self"))

             ;; There are test files not shipped in the release tarball
             (substitute* "test/test-icon.py"
               (("def test_validate_icon_theme") "def _test_validate_icon_theme"))
             (invoke "nosetests" "-v"))))))
     (list
      #:test-flags
      ;; Tests failing with error: AssertionError: 'image' != 'inode'
      #~(list "--deselect=test/test_mime.py::MimeTest::test_get_type"
              "--deselect=test/test_mime.py::MimeTest::test_get_type2")
      #:phases
      #~(modify-phases %standard-phases
          (add-before 'check 'pre-check
            (lambda _
              (setenv "XDG_DATA_DIRS"
                      (string-append #$(this-package-native-input "shared-mime-info")
                                     "/share/")))))))
    (native-inputs
     ;; For tests.
     (list shared-mime-info hicolor-icon-theme python-nose))
     (list shared-mime-info
           hicolor-icon-theme
           python-pytest
           python-setuptools))
    (home-page "https://www.freedesktop.org/wiki/Software/pyxdg")
    (synopsis "Implementations of freedesktop.org standards in Python")
    (description