diff mbox series

[bug#41455] gnu: Add python-daemux

Message ID 87d06wazez.fsf@alice.lan
State Accepted
Headers show
Series [bug#41455] gnu: Add python-daemux | expand

Checks

Context Check Description
cbaines/applying patch fail View Laminar job
cbaines/applying patch fail View Laminar job

Commit Message

Edouard Klein May 22, 2020, 1:10 p.m. UTC
* /gnu/packages/python-xyz.scm (python-daemux): New variable
---
 gnu/packages/python-xyz.scm | 38 +++++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)

Comments

Marius Bakke May 23, 2020, 6:45 p.m. UTC | #1
Edouard Klein <edk@beaver-labs.com> writes:

> * /gnu/packages/python-xyz.scm (python-daemux): New variable

Thanks!  The package LGTM but already does not apply because other
packages have been appended to python-xyz.scm.  To reduce change of
merge conflicts, I recommend adding packages somewhere "in the middle".

However, I wonder if this and python-libtmux are better suited in
tmux.scm.  WDYT?

In any case can you rebase this patch?  Thanks in advance!
Edouard Klein May 25, 2020, 9:31 a.m. UTC | #2
Hi !

Thank you for reviewing the patches.

Marius Bakke writes:

> Edouard Klein <edk@beaver-labs.com> writes:
>
>> * /gnu/packages/python-xyz.scm (python-daemux): New variable
>
> Thanks!  The package LGTM but already does not apply because other
> packages have been appended to python-xyz.scm.  To reduce change of
> merge conflicts, I recommend adding packages somewhere "in the
> middle".

Thanks for the tip :)

>
> However, I wonder if this and python-libtmux are better suited in
> tmux.scm.  WDYT?

I have no strong feelings one way or the other, but I slightly lean
on the side of tmux.scm. I'll send two patches for python-libtmux and
python-daemux from the current master, in tmux.scm.

>
> In any case can you rebase this patch?  Thanks in advance!
Edouard Klein June 3, 2020, 8:17 a.m. UTC | #3
So, I first removed the git dependency from pytest 4
(it turns out that by writing the version in PKG-INFO,
setuptools-scm will find it), then realized that no test
were collected and forwent the test altogether.

Then it dawned on me that as you said pytest-4 was not even necessary.
I forgot why I put it there in the first place.

So anyway, here are two patches for libtmux and daemux. Hopefully this
time I did not miss anything.

Cheers,

Edouard.



GNU bug Tracking System writes:

> Thank you for filing a new bug report with debbugs.gnu.org.
>
> This is an automatically generated reply to let you know your message
> has been received.
>
> Your message is being forwarded to the package maintainers and other
> interested parties for their attention; they will reply in due course.
>
> Your message has been sent to the package maintainer(s):
>  guix-patches@gnu.org
>
> If you wish to submit further information on this problem, please
> send it to 41455@debbugs.gnu.org.
>
> Please do not send mail to help-debbugs@gnu.org unless you wish
> to report a problem with the Bug-tracking system.
diff mbox series

Patch

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 8118c6d867..1b32e7e2a8 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -20075,3 +20075,41 @@  It builds upon tmux's target and formats to create an object mapping to traverse
     "Questionary helps make the input prompts easy to read and answer for the user
 using multi-select lists, confirmations, free text prompts, completion, etc.")
   (license license:expat)))
+
+(define-public python-daemux
+  (package
+    (name "python-daemux")
+    (version "0.1.0")
+    (source
+     ;; We fetch from the Git repo because there are no tests in the PyPI
+     ;; archive.
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/edouardklein/daemux.git")
+             (commit "58e30331d3cce08655cb5f55e94396568d484f9a")))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0cb8v552f2hkwz6d3hwsmrz3gd28jikga3lcc3r1zlw8ra7804ph"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases (modify-phases %standard-phases
+                  (replace 'check
+                    (lambda _
+                      (mkdir-p "tmptmux")
+                      (setenv "TMUX_TMPDIR" (string-append (getcwd) "/tmptmux"))
+                      (invoke "tmux" "new-session" "-d")
+                      (invoke "make" "test"))))))
+    (propagated-inputs
+     `(("python-libtmux" ,python-libtmux)))
+    (native-inputs
+     `(("python-coverage" ,python-coverage)
+       ("python-sphinx" ,python-sphinx)))
+    (home-page "https://github.com/edouardklein/daemux")
+    (synopsis
+     "Start, stop, restart and check daemons via tmux")
+    (description
+     "Daemux lets you run daemons in a tmux pane.  Users can launch long-running
+background tasks, and check these tasks' health by hand, relaunch them, etc. by attaching
+to the corresponding pane in tmux.")
+    (license license:agpl3+)))