~ruther/guix-local

8dbfb0202bcd5ad845433b50f2d933ed5a466d1c — Nicolas Graves 3 months ago 69d708f
gnu: python-i3ipc: Move to (gnu packages wm).

* gnu/packages/python-xyz.scm (python-i3ipc): Move from here ...
* gnu/packages/wm.scm (python-i3ipc): ... to here.
(python-i3ipc)[source]: Update to 2.2.1-0.a670f24.
[build-system]: Switch to pyproject-build-system.
[arguments]<#:test-flags>: Ignore failing tests.
<#·phases>: Add phases 'fix-configuration and 'start-xserver to run
tests properly.
[native-inputs]: Add i3-wm, python-pytest, python-pytest-asyncio,
python-pytest-timeout, python-setuptools, xorg-server-for-tests.

Change-Id: I80fd9fcc3c712238ffe0addc7ceecb2e6341b503
Signed-off-by: Sharlatan Hellseher <sharlatanus@gmail.com>
2 files changed, 58 insertions(+), 23 deletions(-)

M gnu/packages/python-xyz.scm
M gnu/packages/wm.scm
M gnu/packages/python-xyz.scm => gnu/packages/python-xyz.scm +0 -23
@@ 35614,29 35614,6 @@ compatible with BibTeX's own parser.")
      ;; package does not contain any generated files.
      (license license:expat))))

(define-public python-i3ipc
  (package
    (name "python-i3ipc")
    (version "2.2.1")
    (source (origin
              (method git-fetch)
              (uri (git-reference
                    (url "https://github.com/altdesktop/i3ipc-python")
                    (commit (string-append "v" version))))
              (file-name (git-file-name name version))
              (sha256
               (base32
                "13bzs9dcv27czpnnbgz7a037lm8h991c8gk0qzzk5mq5yak24715"))))
    (build-system python-build-system)
    (arguments (list #:tests? #f))      ;FIXME: some tests are unable to run
    (propagated-inputs (list python-xlib))
    (home-page "https://github.com/altdesktop/i3ipc-python")
    (synopsis "Python library for controlling i3 and Sway")
    (description
     "This package provides a Python library for controlling the i3 and Sway
window managers.")
    (license license:bsd-3)))

(define-public i3-autotiling
  (package
    (name "i3-autotiling")

M gnu/packages/wm.scm => gnu/packages/wm.scm +58 -0
@@ 881,6 881,64 @@ You can then subscribe to events or send messages and receive their replies.")
    ;; Can be used with either license.
    (license (list license:gpl3+ license:perl-license))))

(define-public python-i3ipc
  (package
    (name "python-i3ipc")
    (properties '((commit . "a670f24e7e04f509de8161cf760afe929c22ae93")
                  (revision . "0")))
    (version (git-version "2.2.1"
                          (assoc-ref properties 'revision)
                          (assoc-ref properties 'commit)))
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
              (url "https://github.com/altdesktop/i3ipc-python")
              (commit (assoc-ref properties 'commit))))
       (file-name (git-file-name name version))
       (sha256
        (base32 "1mp1471vc9rwf9d045snasxyqrx80yiy57dkjsqamnrxix4npksa"))))
    (build-system pyproject-build-system)
    (arguments
     (list
      #:test-flags
      #~(list
         ;; XXX: Asyncio incompatibility, the API laggs behind.
         "--ignore-glob=test/aio/*.py"
         "-k" (string-append
               ;; Negligible pixel differences.
               "not test_resize"
               ;; Broken pipe, most likely wrong socket permissions/port.
               " and not test_shutdown_event_reconnect"))
      #:phases
      #~(modify-phases %standard-phases
          (add-before 'check 'fix-configuration
            (lambda* (#:key inputs #:allow-other-keys)
              (substitute* "test/i3.config"
                (("/bin/true")
                 (which "true")))
              (setenv "HOME" (getcwd))))
          (add-before 'check 'start-xserver
            (lambda* (#:key inputs #:allow-other-keys)
              ;; Some tests require an X server, but does not start one.
              (let ((Xvfb (search-input-file inputs "bin/Xvfb"))
                    (display ":1"))
                (setenv "DISPLAY" display)
                (zero? (system (string-append Xvfb " " display " &")))))))))
    (native-inputs (list i3-wm
                         python-pytest
                         python-pytest-asyncio
                         python-pytest-timeout
                         python-setuptools
                         xorg-server-for-tests))
    (propagated-inputs (list python-xlib))
    (home-page "https://github.com/altdesktop/i3ipc-python")
    (synopsis "Python library for controlling i3 and Sway")
    (description
     "This package provides a Python library for controlling the i3 and Sway
window managers.")
    (license license:bsd-3)))

(define-public python-i3-py
  (package
    (name "python-i3-py")