diff mbox series

[bug#49123,20/24] gnu: Add python-plyer.

Message ID 20210620010742.4259-20-0x2d@disroot.org
State New
Headers show
Series [bug#49123,01/24] gnu: Add pyotherside. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

slg June 20, 2021, 1:07 a.m. UTC
* gnu/packages/python-xyz.scm (python-plyer): New variable.
---
 gnu/packages/python-xyz.scm | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

Comments

M June 21, 2021, 3:53 p.m. UTC | #1
> +(define-public python-plyer
> +  (package
> +    (name "python-plyer")
> +    [...]
> +    (arguments
> +     `(#:tests? #f)) ;; Circular dependency on itself

Seems odd that python-plyer's tests cannot find
python-plyer, but whatever. You can try to work-around the cycle
by defining two python-plyer packages, like this
(fill in the ...):

(define-public python-plyer
  (package
    (name ...)
    (version ...)
    (build-system ...)
    ;; do not add (arguments ...) here!
    ;; (This comment should not go into the revised patch)
    (native-inputs
      ;; Add a comment on why this is necessary
      `(("python-plyer" ,python-plyer-for-tests)))
    (home-page ...)
    (synopsis ...)
    (description ...)))

(define python-plyer-for-tests
  (package/hidden
    (inherit python-plyer)
    (native-inputs '())))

That way, first a python-plyer without tests will be built,
and then the real python-plyer will be built with tests.

Greetings,
Maxime.
diff mbox series

Patch

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index ff3d279506..6db019082d 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -26063,3 +26063,23 @@  is a Python port from filetype Go package.")
     (synopsis "Python logging library")
     (description "An awesome logging implementation that is fun to use.")
     (license license:bsd-1)))
+
+(define-public python-plyer
+  (package
+    (name "python-plyer")
+    (version "2.0.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "plyer" version))
+       (sha256
+        (base32
+         "156z58gzb3afzilhdbsm323sn0sky1n59kgaxmpg73a3phbqpqwd"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:tests? #f)) ;; Circular dependency on itself
+    (home-page "https://plyer.readthedocs.io/en/latest/")
+    (synopsis "API for common features found on various platforms")
+    (description "Plyer is a platform-independent api to use features
+commonly found on various platforms, notably mobile ones, in Python.")
+    (license license:x11)))