* [bug#41455] [PATCH] gnu: Add python-daemux
@ 2020-05-22 13:10 Edouard Klein
2020-05-23 18:45 ` Marius Bakke
` (8 more replies)
0 siblings, 9 replies; 20+ messages in thread
From: Edouard Klein @ 2020-05-22 13:10 UTC (permalink / raw)
To: 41455
* /gnu/packages/python-xyz.scm (python-daemux): New variable
---
gnu/packages/python-xyz.scm | 38 +++++++++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+)
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+)))
--
2.26.2
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [bug#41455] [PATCH] gnu: Add python-daemux
2020-05-22 13:10 [bug#41455] [PATCH] gnu: Add python-daemux Edouard Klein
@ 2020-05-23 18:45 ` Marius Bakke
2020-05-25 9:31 ` Edouard Klein
2020-05-25 9:32 ` [bug#41455] [PATCH 1/2] gnu: Add python-libtmux Edouard Klein
` (7 subsequent siblings)
8 siblings, 1 reply; 20+ messages in thread
From: Marius Bakke @ 2020-05-23 18:45 UTC (permalink / raw)
To: Edouard Klein, 41455
[-- Attachment #1: Type: text/plain, Size: 460 bytes --]
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!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]
^ permalink raw reply [flat|nested] 20+ messages in thread
* [bug#41455] [PATCH] gnu: Add python-daemux
2020-05-23 18:45 ` Marius Bakke
@ 2020-05-25 9:31 ` Edouard Klein
0 siblings, 0 replies; 20+ messages in thread
From: Edouard Klein @ 2020-05-25 9:31 UTC (permalink / raw)
To: 41455
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!
^ permalink raw reply [flat|nested] 20+ messages in thread
* [bug#41455] [PATCH 1/2] gnu: Add python-libtmux
2020-05-22 13:10 [bug#41455] [PATCH] gnu: Add python-daemux Edouard Klein
2020-05-23 18:45 ` Marius Bakke
@ 2020-05-25 9:32 ` Edouard Klein
2020-05-25 22:43 ` Marius Bakke
2020-05-25 9:33 ` [bug#41455] [PATCH 2/2] gnu: Add python-daemux Edouard Klein
` (6 subsequent siblings)
8 siblings, 1 reply; 20+ messages in thread
From: Edouard Klein @ 2020-05-25 9:32 UTC (permalink / raw)
To: 41455
* gnu/packages/check.scm (python-pytest-4): New variable.
* gnu/packages/tmux.scm (python-libtmux): New variable.
---
gnu/packages/check.scm | 49 ++++++++++++++++++++++++++++++++++++++++++
gnu/packages/tmux.scm | 48 +++++++++++++++++++++++++++++++++++++++++
2 files changed, 97 insertions(+)
diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm
index 7d7fd189bc..5d3e44a16d 100644
--- a/gnu/packages/check.scm
+++ b/gnu/packages/check.scm
@@ -33,6 +33,7 @@
;;; Copyright © 2020 Lars-Dominik Braun <ldb@leibniz-psychology.org>
;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
;;; Copyright © 2020 Josh Marshall <joshua.r.marshall.1991@gmail.com>
+;;; Copyright © 2020 Edouard Klein <edk@beaver-labs.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -66,6 +67,7 @@
#:use-module (gnu packages python)
#:use-module (gnu packages python-web)
#:use-module (gnu packages python-xyz)
+ #:use-module (gnu packages version-control)
#:use-module (gnu packages time)
#:use-module (gnu packages xml)
#:use-module (guix utils)
@@ -819,6 +821,53 @@ and many external plugins.")
(license license:expat)
(properties `((python2-variant . ,(delay python2-pytest))))))
+(define-public python-pytest-4
+ (package
+ (name "python-pytest-4")
+ (version "4.5.0")
+ (source
+ (origin
+ (method git-fetch)
+ ;; Pypi source tarball does not include tests
+ (uri (git-reference
+ (url "https://github.com/pytest-dev/pytest.git")
+ (commit version)))
+ (file-name "python-pytest-4")
+ (sha256
+ (base32
+ "0igxfasjqabkzlb81vxqr58pfsdwjx4zzd1nc1b48wn6xnkkllhk"))))
+ (build-system python-build-system)
+ (propagated-inputs
+ `(("python-atomicwrites" ,python-atomicwrites)
+ ("python-attrs" ,python-attrs)
+ ("python-attrs" ,python-attrs)
+ ("python-more-itertools" ,python-more-itertools)
+ ("python-pluggy" ,python-pluggy)
+ ("python-six" ,python-six)
+ ("python-py" ,python-py)
+ ("python-wcwidth" ,python-wcwidth)))
+ (native-inputs
+ `(("python-setuptools-scm" ,python-setuptools-scm)
+ ("git" ,git)))
+ (arguments `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'git-tag
+ (lambda _
+ ;; setuptools-scm needs to know the version
+ (invoke "git" "init")
+ (invoke "git" "add" ".")
+ (invoke "git" "config" "user.name" "John Doe")
+ (invoke "git" "config" "user.email" "nobody@example.com")
+ (invoke "git" "commit" "-m" "dummy commit")
+ (invoke "git" "tag" ,version))))))
+ (home-page "https://docs.pytest.org/en/latest/")
+ (synopsis "Python testing library")
+ (description
+ "Pytest is a testing tool that provides auto-discovery of test modules
+and functions, detailed info on failing assert statements, modular fixtures,
+and many external plugins.")
+ (license license:expat)))
+
;; Pytest 4.x are the last versions that support Python 2.
(define-public python2-pytest
(package
diff --git a/gnu/packages/tmux.scm b/gnu/packages/tmux.scm
index 8b54849b18..c4dd963b53 100644
--- a/gnu/packages/tmux.scm
+++ b/gnu/packages/tmux.scm
@@ -7,6 +7,7 @@
;;; Copyright © 2019 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2019 Oleg Pykhalov <go.wigust@gmail.com>
;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
+;;; Copyright © 2020 Edouard Klein <edk@beaver-labs.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -30,8 +31,11 @@
#:use-module (guix git-download)
#:use-module (guix build-system gnu)
#:use-module (guix build-system trivial)
+ #:use-module (guix build-system python)
#:use-module (gnu packages)
#:use-module (gnu packages bash)
+ #:use-module (gnu packages check)
+ #:use-module (gnu packages linux)
#:use-module (gnu packages libevent)
#:use-module (gnu packages ncurses))
@@ -138,6 +142,50 @@ command and helper commands provided by tmuxifier to manage Tmux sessions and
windows.")
(license license:expat)))
+(define-public python-libtmux
+ (package
+ (name "python-libtmux")
+ (version "0.8.2")
+ (source
+ (origin
+ (method git-fetch)
+ ;; Pypi source tarball does not include tests
+ (uri (git-reference
+ (url "https://github.com/tmux-python/libtmux.git")
+ (commit (string-append "v" version))))
+ (file-name "python-libtmux")
+ (sha256
+ (base32
+ "1akjv6aqpc690c4l2cjh0fxbpxxg63sfjggapfjjjaqmcl38g1dz"))))
+ (build-system python-build-system)
+ (propagated-inputs
+ `(("python-pytest-4" ,python-pytest-4)
+ ("tmux" ,tmux)
+ ("procps" ,procps))) ;; Tests need top
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (replace 'check
+ (lambda _
+ ;; Extend PYTHONPATH so the built package will be found.
+ (setenv "PYTHONPATH"
+ (string-append (getcwd) "/build/lib:"
+ (getenv "PYTHONPATH")))
+ ;; Skip tests that I suspect fail because of a change
+ ;; in behavior in tmux 3 from tmux 2
+ ;; https://github.com/tmux-python/libtmux/issues/281
+ (invoke "pytest" "-vv" "-k"
+ (string-append "not test_show_option_unknown "
+ "and not test_show_window_option_unknown"))
+ #t)))))
+ (home-page
+ "https://github.com/tmux-python/libtmux")
+ (synopsis "Scripting library / orm for tmux")
+ (description "Libtmux is the tool behind tmuxp, a tmux workspace manager in python.
+It builds upon tmux's target and formats to create an object mapping to traverse,
+ inspect and interact with live tmux sessions.")
+ (license license:expat)))
+
(define-public tmux-xpanes
(package
(name "tmux-xpanes")
--
2.26.2
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [bug#41455] [PATCH 2/2] gnu: Add python-daemux
2020-05-22 13:10 [bug#41455] [PATCH] gnu: Add python-daemux Edouard Klein
2020-05-23 18:45 ` Marius Bakke
2020-05-25 9:32 ` [bug#41455] [PATCH 1/2] gnu: Add python-libtmux Edouard Klein
@ 2020-05-25 9:33 ` Edouard Klein
2020-05-25 22:46 ` Marius Bakke
2020-05-26 8:23 ` [bug#41455] [PATCH 1/2] gnu: Add python-pytest-4 Edouard Klein
` (5 subsequent siblings)
8 siblings, 1 reply; 20+ messages in thread
From: Edouard Klein @ 2020-05-25 9:33 UTC (permalink / raw)
To: 41455
* gnu/packages/tmux.scm (python-daemux): New variable.
---
gnu/packages/tmux.scm | 39 +++++++++++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+)
diff --git a/gnu/packages/tmux.scm b/gnu/packages/tmux.scm
index c4dd963b53..106a6a3f5f 100644
--- a/gnu/packages/tmux.scm
+++ b/gnu/packages/tmux.scm
@@ -35,6 +35,7 @@
#:use-module (gnu packages)
#:use-module (gnu packages bash)
#:use-module (gnu packages check)
+ #:use-module (gnu packages sphinx)
#:use-module (gnu packages linux)
#:use-module (gnu packages libevent)
#:use-module (gnu packages ncurses))
@@ -186,6 +187,44 @@ It builds upon tmux's target and formats to create an object mapping to traverse
inspect and interact with live tmux sessions.")
(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+)))
+
(define-public tmux-xpanes
(package
(name "tmux-xpanes")
--
2.26.2
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [bug#41455] [PATCH 1/2] gnu: Add python-libtmux
2020-05-25 9:32 ` [bug#41455] [PATCH 1/2] gnu: Add python-libtmux Edouard Klein
@ 2020-05-25 22:43 ` Marius Bakke
0 siblings, 0 replies; 20+ messages in thread
From: Marius Bakke @ 2020-05-25 22:43 UTC (permalink / raw)
To: Edouard Klein, 41455
[-- Attachment #1: Type: text/plain, Size: 3463 bytes --]
Edouard Klein <edk@beaver-labs.com> writes:
> * gnu/packages/check.scm (python-pytest-4): New variable.
> * gnu/packages/tmux.scm (python-libtmux): New variable.
Thanks! Can you submit these as two separate patches?
> + (native-inputs
> + `(("python-setuptools-scm" ,python-setuptools-scm)
> + ("git" ,git)))
> + (arguments `(#:phases
> + (modify-phases %standard-phases
> + (add-after 'unpack 'git-tag
> + (lambda _
> + ;; setuptools-scm needs to know the version
> + (invoke "git" "init")
> + (invoke "git" "add" ".")
> + (invoke "git" "config" "user.name" "John Doe")
> + (invoke "git" "config" "user.email" "nobody@example.com")
> + (invoke "git" "commit" "-m" "dummy commit")
> + (invoke "git" "tag" ,version))))))
This is weird, we haven't needed this before. Is there a way to avoid
the dependency on git here? In the worst case maybe we can create
".git/refs/tags/,version" manually? :-/
Also, please make this inherit from pytest instead of duplicating all
the fields.
[...]
> +(define-public python-libtmux
> + (package
> + (name "python-libtmux")
> + (version "0.8.2")
> + (source
> + (origin
> + (method git-fetch)
> + ;; Pypi source tarball does not include tests
> + (uri (git-reference
> + (url "https://github.com/tmux-python/libtmux.git")
> + (commit (string-append "v" version))))
> + (file-name "python-libtmux")
> + (sha256
> + (base32
> + "1akjv6aqpc690c4l2cjh0fxbpxxg63sfjggapfjjjaqmcl38g1dz"))))
> + (build-system python-build-system)
> + (propagated-inputs
> + `(("python-pytest-4" ,python-pytest-4)
Do you know if pytest 4 is really needed? Often Python packages pin a
specific version for no good reason, and one can simply substitute "=="
with ">=" in setup.py and it's all good.
> + ("tmux" ,tmux)
Even though this is useless without tmux, I'm not sure if we should
propagate it. Some users might have custom versions of tmux, but would
still want to use this library. WDYT?
> + ("procps" ,procps))) ;; Tests need top
^ only one semicolon for margin comments
;typically without a space, like this
> + (arguments
> + `(#:phases
> + (modify-phases %standard-phases
> + (replace 'check
> + (lambda _
> + ;; Extend PYTHONPATH so the built package will be found.
> + (setenv "PYTHONPATH"
> + (string-append (getcwd) "/build/lib:"
> + (getenv "PYTHONPATH")))
> + ;; Skip tests that I suspect fail because of a change
> + ;; in behavior in tmux 3 from tmux 2
> + ;; https://github.com/tmux-python/libtmux/issues/281
> + (invoke "pytest" "-vv" "-k"
> + (string-append "not test_show_option_unknown "
> + "and not test_show_window_option_unknown"))
> + #t)))))
> + (home-page
> + "https://github.com/tmux-python/libtmux")
This line break is unnecessary.
Otherwise looks good. Can you send updated patches?
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]
^ permalink raw reply [flat|nested] 20+ messages in thread
* [bug#41455] [PATCH 2/2] gnu: Add python-daemux
2020-05-25 9:33 ` [bug#41455] [PATCH 2/2] gnu: Add python-daemux Edouard Klein
@ 2020-05-25 22:46 ` Marius Bakke
2020-05-26 8:57 ` Edouard Klein
0 siblings, 1 reply; 20+ messages in thread
From: Marius Bakke @ 2020-05-25 22:46 UTC (permalink / raw)
To: Edouard Klein, 41455
[-- Attachment #1: Type: text/plain, Size: 1770 bytes --]
Edouard Klein <edk@beaver-labs.com> writes:
> * gnu/packages/tmux.scm (python-daemux): New variable.
[...]
> +(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")))
This upstream looks familiar... Do you think upstream is willing to tag
a 0.1.0 release instead of using a "magic" commit identifier? :-)
> + (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"))))))
Nice! I guess 'tmux' needs to be a native-input if we don't propagate
it from libtmux.
> + (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")
This line break is unnecessary.
Otherwise LGTM, thanks!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]
^ permalink raw reply [flat|nested] 20+ messages in thread
* [bug#41455] [PATCH 1/2] gnu: Add python-pytest-4
2020-05-22 13:10 [bug#41455] [PATCH] gnu: Add python-daemux Edouard Klein
` (2 preceding siblings ...)
2020-05-25 9:33 ` [bug#41455] [PATCH 2/2] gnu: Add python-daemux Edouard Klein
@ 2020-05-26 8:23 ` Edouard Klein
2020-05-30 12:07 ` Marius Bakke
2020-05-26 8:24 ` [bug#41455] [PATCH 2/2] gnu: Add python-libtmux Edouard Klein
` (4 subsequent siblings)
8 siblings, 1 reply; 20+ messages in thread
From: Edouard Klein @ 2020-05-26 8:23 UTC (permalink / raw)
To: 41455
* gnu/packages/check.scm (python-pytest-4): New variable.
---
gnu/packages/check.scm | 49 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 49 insertions(+)
diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm
index 7d7fd189bc..5d3e44a16d 100644
--- a/gnu/packages/check.scm
+++ b/gnu/packages/check.scm
@@ -33,6 +33,7 @@
;;; Copyright © 2020 Lars-Dominik Braun <ldb@leibniz-psychology.org>
;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
;;; Copyright © 2020 Josh Marshall <joshua.r.marshall.1991@gmail.com>
+;;; Copyright © 2020 Edouard Klein <edk@beaver-labs.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -66,6 +67,7 @@
#:use-module (gnu packages python)
#:use-module (gnu packages python-web)
#:use-module (gnu packages python-xyz)
+ #:use-module (gnu packages version-control)
#:use-module (gnu packages time)
#:use-module (gnu packages xml)
#:use-module (guix utils)
@@ -819,6 +821,53 @@ and many external plugins.")
(license license:expat)
(properties `((python2-variant . ,(delay python2-pytest))))))
+(define-public python-pytest-4
+ (package
+ (name "python-pytest-4")
+ (version "4.5.0")
+ (source
+ (origin
+ (method git-fetch)
+ ;; Pypi source tarball does not include tests
+ (uri (git-reference
+ (url "https://github.com/pytest-dev/pytest.git")
+ (commit version)))
+ (file-name "python-pytest-4")
+ (sha256
+ (base32
+ "0igxfasjqabkzlb81vxqr58pfsdwjx4zzd1nc1b48wn6xnkkllhk"))))
+ (build-system python-build-system)
+ (propagated-inputs
+ `(("python-atomicwrites" ,python-atomicwrites)
+ ("python-attrs" ,python-attrs)
+ ("python-attrs" ,python-attrs)
+ ("python-more-itertools" ,python-more-itertools)
+ ("python-pluggy" ,python-pluggy)
+ ("python-six" ,python-six)
+ ("python-py" ,python-py)
+ ("python-wcwidth" ,python-wcwidth)))
+ (native-inputs
+ `(("python-setuptools-scm" ,python-setuptools-scm)
+ ("git" ,git)))
+ (arguments `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'git-tag
+ (lambda _
+ ;; setuptools-scm needs to know the version
+ (invoke "git" "init")
+ (invoke "git" "add" ".")
+ (invoke "git" "config" "user.name" "John Doe")
+ (invoke "git" "config" "user.email" "nobody@example.com")
+ (invoke "git" "commit" "-m" "dummy commit")
+ (invoke "git" "tag" ,version))))))
+ (home-page "https://docs.pytest.org/en/latest/")
+ (synopsis "Python testing library")
+ (description
+ "Pytest is a testing tool that provides auto-discovery of test modules
+and functions, detailed info on failing assert statements, modular fixtures,
+and many external plugins.")
+ (license license:expat)))
+
;; Pytest 4.x are the last versions that support Python 2.
(define-public python2-pytest
(package
--
2.26.2
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [bug#41455] [PATCH 2/2] gnu: Add python-libtmux
2020-05-22 13:10 [bug#41455] [PATCH] gnu: Add python-daemux Edouard Klein
` (3 preceding siblings ...)
2020-05-26 8:23 ` [bug#41455] [PATCH 1/2] gnu: Add python-pytest-4 Edouard Klein
@ 2020-05-26 8:24 ` Edouard Klein
2020-05-30 12:17 ` Marius Bakke
2020-05-26 8:58 ` [bug#41455] [PATCH] gnu: Add python-daemux Edouard Klein
` (3 subsequent siblings)
8 siblings, 1 reply; 20+ messages in thread
From: Edouard Klein @ 2020-05-26 8:24 UTC (permalink / raw)
To: 41455
* gnu/packages/tmux.scm (python-libtmux): New variable.
---
gnu/packages/tmux.scm | 48 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 48 insertions(+)
diff --git a/gnu/packages/tmux.scm b/gnu/packages/tmux.scm
index 8b54849b18..c4dd963b53 100644
--- a/gnu/packages/tmux.scm
+++ b/gnu/packages/tmux.scm
@@ -7,6 +7,7 @@
;;; Copyright © 2019 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2019 Oleg Pykhalov <go.wigust@gmail.com>
;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
+;;; Copyright © 2020 Edouard Klein <edk@beaver-labs.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -30,8 +31,11 @@
#:use-module (guix git-download)
#:use-module (guix build-system gnu)
#:use-module (guix build-system trivial)
+ #:use-module (guix build-system python)
#:use-module (gnu packages)
#:use-module (gnu packages bash)
+ #:use-module (gnu packages check)
+ #:use-module (gnu packages linux)
#:use-module (gnu packages libevent)
#:use-module (gnu packages ncurses))
@@ -138,6 +142,50 @@ command and helper commands provided by tmuxifier to manage Tmux sessions and
windows.")
(license license:expat)))
+(define-public python-libtmux
+ (package
+ (name "python-libtmux")
+ (version "0.8.2")
+ (source
+ (origin
+ (method git-fetch)
+ ;; Pypi source tarball does not include tests
+ (uri (git-reference
+ (url "https://github.com/tmux-python/libtmux.git")
+ (commit (string-append "v" version))))
+ (file-name "python-libtmux")
+ (sha256
+ (base32
+ "1akjv6aqpc690c4l2cjh0fxbpxxg63sfjggapfjjjaqmcl38g1dz"))))
+ (build-system python-build-system)
+ (propagated-inputs
+ `(("python-pytest-4" ,python-pytest-4)
+ ("tmux" ,tmux)
+ ("procps" ,procps))) ;; Tests need top
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (replace 'check
+ (lambda _
+ ;; Extend PYTHONPATH so the built package will be found.
+ (setenv "PYTHONPATH"
+ (string-append (getcwd) "/build/lib:"
+ (getenv "PYTHONPATH")))
+ ;; Skip tests that I suspect fail because of a change
+ ;; in behavior in tmux 3 from tmux 2
+ ;; https://github.com/tmux-python/libtmux/issues/281
+ (invoke "pytest" "-vv" "-k"
+ (string-append "not test_show_option_unknown "
+ "and not test_show_window_option_unknown"))
+ #t)))))
+ (home-page
+ "https://github.com/tmux-python/libtmux")
+ (synopsis "Scripting library / orm for tmux")
+ (description "Libtmux is the tool behind tmuxp, a tmux workspace manager in python.
+It builds upon tmux's target and formats to create an object mapping to traverse,
+ inspect and interact with live tmux sessions.")
+ (license license:expat)))
+
(define-public tmux-xpanes
(package
(name "tmux-xpanes")
--
2.26.2
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [bug#41455] [PATCH 2/2] gnu: Add python-daemux
2020-05-25 22:46 ` Marius Bakke
@ 2020-05-26 8:57 ` Edouard Klein
2020-05-30 12:04 ` Marius Bakke
0 siblings, 1 reply; 20+ messages in thread
From: Edouard Klein @ 2020-05-26 8:57 UTC (permalink / raw)
To: 41455
Marius Bakke writes:
> Edouard Klein <edk@beaver-labs.com> writes:
>
>> * gnu/packages/tmux.scm (python-daemux): New variable.
>
> [...]
>
>> +(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")))
>
> This upstream looks familiar... Do you think upstream is willing to tag
> a 0.1.0 release instead of using a "magic" commit identifier? :-)
>
Of course :)
>> + (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"))))))
>
> Nice! I guess 'tmux' needs to be a native-input if we don't propagate
> it from libtmux.
>
I'm not sure what you mean. tmux is indeed a propagated input of
python-libtmux, which is in turn a propagated input of python-daemux. Do
you mean that it should be added explicitly here instead of being
implicit ?
>> + (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")
>
> This line break is unnecessary.
>
> Otherwise LGTM, thanks!
Cool ! Thank you for reviewing.
^ permalink raw reply [flat|nested] 20+ messages in thread
* [bug#41455] [PATCH] gnu: Add python-daemux
2020-05-22 13:10 [bug#41455] [PATCH] gnu: Add python-daemux Edouard Klein
` (4 preceding siblings ...)
2020-05-26 8:24 ` [bug#41455] [PATCH 2/2] gnu: Add python-libtmux Edouard Klein
@ 2020-05-26 8:58 ` Edouard Klein
2020-05-30 12:18 ` Marius Bakke
[not found] ` <handler.41455.B.159015302429679.ack@debbugs.gnu.org>
` (2 subsequent siblings)
8 siblings, 1 reply; 20+ messages in thread
From: Edouard Klein @ 2020-05-26 8:58 UTC (permalink / raw)
To: 41455
* gnu/packages/tmux.scm (python-daemux): New variable.
---
gnu/packages/tmux.scm | 39 +++++++++++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+)
diff --git a/gnu/packages/tmux.scm b/gnu/packages/tmux.scm
index c4dd963b53..ace4664813 100644
--- a/gnu/packages/tmux.scm
+++ b/gnu/packages/tmux.scm
@@ -35,6 +35,7 @@
#:use-module (gnu packages)
#:use-module (gnu packages bash)
#:use-module (gnu packages check)
+ #:use-module (gnu packages sphinx)
#:use-module (gnu packages linux)
#:use-module (gnu packages libevent)
#:use-module (gnu packages ncurses))
@@ -186,6 +187,44 @@ It builds upon tmux's target and formats to create an object mapping to traverse
inspect and interact with live tmux sessions.")
(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 "v0.1.0")))
+ (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+)))
+
(define-public tmux-xpanes
(package
(name "tmux-xpanes")
--
2.26.2
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [bug#41455] [PATCH 2/2] gnu: Add python-daemux
2020-05-26 8:57 ` Edouard Klein
@ 2020-05-30 12:04 ` Marius Bakke
0 siblings, 0 replies; 20+ messages in thread
From: Marius Bakke @ 2020-05-30 12:04 UTC (permalink / raw)
To: Edouard Klein, 41455
[-- Attachment #1: Type: text/plain, Size: 1260 bytes --]
Edouard Klein <edou@rdklein.fr> writes:
>>> + (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"))))))
>>
>> Nice! I guess 'tmux' needs to be a native-input if we don't propagate
>> it from libtmux.
>>
>
> I'm not sure what you mean. tmux is indeed a propagated input of
> python-libtmux, which is in turn a propagated input of python-daemux. Do
> you mean that it should be added explicitly here instead of being
> implicit ?
Yes, because in another review I recommended against propagating tmux.
The reason is that I (and presumably others) sometimes add custom
patches to my local packages. If the vanilla tmux is propagated, I
would not be able to use python-daemux with my installed patched tmux.
Does that make sense?
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]
^ permalink raw reply [flat|nested] 20+ messages in thread
* [bug#41455] [PATCH 1/2] gnu: Add python-pytest-4
2020-05-26 8:23 ` [bug#41455] [PATCH 1/2] gnu: Add python-pytest-4 Edouard Klein
@ 2020-05-30 12:07 ` Marius Bakke
0 siblings, 0 replies; 20+ messages in thread
From: Marius Bakke @ 2020-05-30 12:07 UTC (permalink / raw)
To: Edouard Klein, 41455
[-- Attachment #1: Type: text/plain, Size: 2375 bytes --]
Edouard Klein <edk@beaver-labs.com> writes:
> * gnu/packages/check.scm (python-pytest-4): New variable.
[...]
> +(define-public python-pytest-4
> + (package
> + (name "python-pytest-4")
> + (version "4.5.0")
> + (source
> + (origin
> + (method git-fetch)
> + ;; Pypi source tarball does not include tests
> + (uri (git-reference
> + (url "https://github.com/pytest-dev/pytest.git")
> + (commit version)))
> + (file-name "python-pytest-4")
> + (sha256
> + (base32
> + "0igxfasjqabkzlb81vxqr58pfsdwjx4zzd1nc1b48wn6xnkkllhk"))))
> + (build-system python-build-system)
> + (propagated-inputs
> + `(("python-atomicwrites" ,python-atomicwrites)
> + ("python-attrs" ,python-attrs)
> + ("python-attrs" ,python-attrs)
> + ("python-more-itertools" ,python-more-itertools)
> + ("python-pluggy" ,python-pluggy)
> + ("python-six" ,python-six)
> + ("python-py" ,python-py)
> + ("python-wcwidth" ,python-wcwidth)))
> + (native-inputs
> + `(("python-setuptools-scm" ,python-setuptools-scm)
> + ("git" ,git)))
> + (arguments `(#:phases
> + (modify-phases %standard-phases
> + (add-after 'unpack 'git-tag
> + (lambda _
> + ;; setuptools-scm needs to know the version
> + (invoke "git" "init")
> + (invoke "git" "add" ".")
> + (invoke "git" "config" "user.name" "John Doe")
> + (invoke "git" "config" "user.email" "nobody@example.com")
> + (invoke "git" "commit" "-m" "dummy commit")
> + (invoke "git" "tag" ,version))))))
> + (home-page "https://docs.pytest.org/en/latest/")
> + (synopsis "Python testing library")
> + (description
> + "Pytest is a testing tool that provides auto-discovery of test modules
> +and functions, detailed info on failing assert statements, modular fixtures,
> +and many external plugins.")
> + (license license:expat)))
Can you make this inherit from pytest instead of duplicating all the
fields?
Also, we should find a way to get rid of the git dependency. Weird that
other versions of Pytest don't have this requirement.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]
^ permalink raw reply [flat|nested] 20+ messages in thread
* [bug#41455] [PATCH 2/2] gnu: Add python-libtmux
2020-05-26 8:24 ` [bug#41455] [PATCH 2/2] gnu: Add python-libtmux Edouard Klein
@ 2020-05-30 12:17 ` Marius Bakke
0 siblings, 0 replies; 20+ messages in thread
From: Marius Bakke @ 2020-05-30 12:17 UTC (permalink / raw)
To: Edouard Klein, 41455
[-- Attachment #1: Type: text/plain, Size: 2531 bytes --]
Edouard Klein <edk@beaver-labs.com> writes:
> * gnu/packages/tmux.scm (python-libtmux): New variable.
[...]
> +(define-public python-libtmux
> + (package
> + (name "python-libtmux")
> + (version "0.8.2")
> + (source
> + (origin
> + (method git-fetch)
> + ;; Pypi source tarball does not include tests
PyPI ----> .
See nit-picks above ^. :-)
> + (uri (git-reference
> + (url "https://github.com/tmux-python/libtmux.git")
> + (commit (string-append "v" version))))
> + (file-name "python-libtmux")
This should be (git-file-name name version).
> + (sha256
> + (base32
> + "1akjv6aqpc690c4l2cjh0fxbpxxg63sfjggapfjjjaqmcl38g1dz"))))
> + (build-system python-build-system)
> + (propagated-inputs
> + `(("python-pytest-4" ,python-pytest-4)
> + ("tmux" ,tmux)
> + ("procps" ,procps))) ;; Tests need top
^^^
Just a single semicolon for margin comments.
Also, all of these should probably be 'native-inputs'.
> + (arguments
> + `(#:phases
> + (modify-phases %standard-phases
> + (replace 'check
> + (lambda _
> + ;; Extend PYTHONPATH so the built package will be found.
> + (setenv "PYTHONPATH"
> + (string-append (getcwd) "/build/lib:"
> + (getenv "PYTHONPATH")))
> + ;; Skip tests that I suspect fail because of a change
> + ;; in behavior in tmux 3 from tmux 2
> + ;; https://github.com/tmux-python/libtmux/issues/281
> + (invoke "pytest" "-vv" "-k"
> + (string-append "not test_show_option_unknown "
> + "and not test_show_window_option_unknown"))
> + #t)))))
> + (home-page
> + "https://github.com/tmux-python/libtmux")
This line break is unnecessary.
> + (synopsis "Scripting library / orm for tmux")
Can we use "Python API for tmux"?
> + (description "Libtmux is the tool behind tmuxp, a tmux workspace manager in python.
Use @command{tmuxp}.
> +It builds upon tmux's target and formats to create an object mapping to traverse,
"target" and "formats" sounds weird. I know it has been taken from the
upstream README, but they have links to clarify the situation.
Perhaps just "It creates object mappings to traverse, ..."
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]
^ permalink raw reply [flat|nested] 20+ messages in thread
* [bug#41455] [PATCH] gnu: Add python-daemux
2020-05-26 8:58 ` [bug#41455] [PATCH] gnu: Add python-daemux Edouard Klein
@ 2020-05-30 12:18 ` Marius Bakke
0 siblings, 0 replies; 20+ messages in thread
From: Marius Bakke @ 2020-05-30 12:18 UTC (permalink / raw)
To: Edouard Klein, 41455
[-- Attachment #1: Type: text/plain, Size: 1546 bytes --]
Edouard Klein <edk@beaver-labs.com> writes:
> * gnu/packages/tmux.scm (python-daemux): New variable.
[...]
> +(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 "v0.1.0")))
Use (string-append "v" version).
> + (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")
This line break is unnecessary.
Can you send updated patches? TIA!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 483 bytes --]
^ permalink raw reply [flat|nested] 20+ messages in thread
* [bug#41455] Acknowledgement ([PATCH] gnu: Add python-daemux)
[not found] ` <handler.41455.B.159015302429679.ack@debbugs.gnu.org>
@ 2020-06-03 8:17 ` Edouard Klein
0 siblings, 0 replies; 20+ messages in thread
From: Edouard Klein @ 2020-06-03 8:17 UTC (permalink / raw)
To: 41455
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.
^ permalink raw reply [flat|nested] 20+ messages in thread
* [bug#41455] [PATCH 1/2] gnu: Add python-libtmux
2020-05-22 13:10 [bug#41455] [PATCH] gnu: Add python-daemux Edouard Klein
` (6 preceding siblings ...)
[not found] ` <handler.41455.B.159015302429679.ack@debbugs.gnu.org>
@ 2020-06-03 8:19 ` Edouard Klein
2020-06-22 19:49 ` Marius Bakke
2020-06-03 8:20 ` [bug#41455] [PATCH 2/2] gnu: Add python-daemux Edouard Klein
8 siblings, 1 reply; 20+ messages in thread
From: Edouard Klein @ 2020-06-03 8:19 UTC (permalink / raw)
To: 41455
* gnu/packages/tmux.scm (python-libtmux): New variable.
---
gnu/packages/tmux.scm | 47 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 47 insertions(+)
diff --git a/gnu/packages/tmux.scm b/gnu/packages/tmux.scm
index 8b54849b18..bf9f2594e1 100644
--- a/gnu/packages/tmux.scm
+++ b/gnu/packages/tmux.scm
@@ -7,6 +7,7 @@
;;; Copyright © 2019 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2019 Oleg Pykhalov <go.wigust@gmail.com>
;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
+;;; Copyright © 2020 Edouard Klein <edk@beaver-labs.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -30,8 +31,11 @@
#:use-module (guix git-download)
#:use-module (guix build-system gnu)
#:use-module (guix build-system trivial)
+ #:use-module (guix build-system python)
#:use-module (gnu packages)
#:use-module (gnu packages bash)
+ #:use-module (gnu packages check)
+ #:use-module (gnu packages linux)
#:use-module (gnu packages libevent)
#:use-module (gnu packages ncurses))
@@ -138,6 +142,49 @@ command and helper commands provided by tmuxifier to manage Tmux sessions and
windows.")
(license license:expat)))
+(define-public python-libtmux
+ (package
+ (name "python-libtmux")
+ (version "0.8.2")
+ (source
+ (origin
+ (method git-fetch)
+ ;; PyPI source tarball does not include tests.
+ (uri (git-reference
+ (url "https://github.com/tmux-python/libtmux.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1akjv6aqpc690c4l2cjh0fxbpxxg63sfjggapfjjjaqmcl38g1dz"))))
+ (build-system python-build-system)
+ (propagated-inputs
+ `(("procps" ,procps)));Tests need top.
+ (native-inputs
+ `(("python-pytest" ,python-pytest)
+ ("tmux" ,tmux)))
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (replace 'check
+ (lambda _
+ ;; Extend PYTHONPATH so the built package will be found.
+ (setenv "PYTHONPATH"
+ (string-append (getcwd) "/build/lib:"
+ (getenv "PYTHONPATH")))
+ ;; Skip tests that I suspect fail because of a change
+ ;; in behavior in tmux 3 from tmux 2
+ ;; https://github.com/tmux-python/libtmux/issues/281
+ (invoke "pytest" "-vv" "-k"
+ (string-append "not test_show_option_unknown "
+ "and not test_show_window_option_unknown"))
+ #t)))))
+ (home-page "https://github.com/tmux-python/libtmux")
+ (synopsis "Python API for tmux")
+ (description "Libtmux is the tool behind @command{tmuxp}, a tmux workspace manager in python.
+It creates object mappings to traverse, inspect and interact with live tmux sessions.")
+ (license license:expat)))
+
(define-public tmux-xpanes
(package
(name "tmux-xpanes")
--
2.26.2
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [bug#41455] [PATCH 2/2] gnu: Add python-daemux
2020-05-22 13:10 [bug#41455] [PATCH] gnu: Add python-daemux Edouard Klein
` (7 preceding siblings ...)
2020-06-03 8:19 ` [bug#41455] [PATCH 1/2] gnu: Add python-libtmux Edouard Klein
@ 2020-06-03 8:20 ` Edouard Klein
2020-06-22 19:52 ` bug#41455: " Marius Bakke
8 siblings, 1 reply; 20+ messages in thread
From: Edouard Klein @ 2020-06-03 8:20 UTC (permalink / raw)
To: 41455
* gnu/packages/tmux.scm (python-daemux): New variable.
---
gnu/packages/tmux.scm | 39 +++++++++++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+)
diff --git a/gnu/packages/tmux.scm b/gnu/packages/tmux.scm
index bf9f2594e1..b1f1811d8c 100644
--- a/gnu/packages/tmux.scm
+++ b/gnu/packages/tmux.scm
@@ -35,6 +35,7 @@
#:use-module (gnu packages)
#:use-module (gnu packages bash)
#:use-module (gnu packages check)
+ #:use-module (gnu packages sphinx)
#:use-module (gnu packages linux)
#:use-module (gnu packages libevent)
#:use-module (gnu packages ncurses))
@@ -185,6 +186,44 @@ windows.")
It creates object mappings to traverse, inspect and interact with live tmux sessions.")
(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 (string-append "v" version))))
+ (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)
+ ("tmux" ,tmux)))
+ (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+)))
+
(define-public tmux-xpanes
(package
(name "tmux-xpanes")
--
2.26.2
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [bug#41455] [PATCH 1/2] gnu: Add python-libtmux
2020-06-03 8:19 ` [bug#41455] [PATCH 1/2] gnu: Add python-libtmux Edouard Klein
@ 2020-06-22 19:49 ` Marius Bakke
0 siblings, 0 replies; 20+ messages in thread
From: Marius Bakke @ 2020-06-22 19:49 UTC (permalink / raw)
To: Edouard Klein, 41455
[-- Attachment #1: Type: text/plain, Size: 182 bytes --]
Edouard Klein <edk@beaver-labs.com> writes:
> * gnu/packages/tmux.scm (python-libtmux): New variable.
Applied, thanks! I fixed the long description line and capitalized
'Python'.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]
^ permalink raw reply [flat|nested] 20+ messages in thread
* bug#41455: [PATCH 2/2] gnu: Add python-daemux
2020-06-03 8:20 ` [bug#41455] [PATCH 2/2] gnu: Add python-daemux Edouard Klein
@ 2020-06-22 19:52 ` Marius Bakke
0 siblings, 0 replies; 20+ messages in thread
From: Marius Bakke @ 2020-06-22 19:52 UTC (permalink / raw)
To: Edouard Klein, 41455-done
[-- Attachment #1: Type: text/plain, Size: 120 bytes --]
Edouard Klein <edk@beaver-labs.com> writes:
> * gnu/packages/tmux.scm (python-daemux): New variable.
Applied, thanks!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]
^ permalink raw reply [flat|nested] 20+ messages in thread
end of thread, other threads:[~2020-06-22 19:53 UTC | newest]
Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-22 13:10 [bug#41455] [PATCH] gnu: Add python-daemux Edouard Klein
2020-05-23 18:45 ` Marius Bakke
2020-05-25 9:31 ` Edouard Klein
2020-05-25 9:32 ` [bug#41455] [PATCH 1/2] gnu: Add python-libtmux Edouard Klein
2020-05-25 22:43 ` Marius Bakke
2020-05-25 9:33 ` [bug#41455] [PATCH 2/2] gnu: Add python-daemux Edouard Klein
2020-05-25 22:46 ` Marius Bakke
2020-05-26 8:57 ` Edouard Klein
2020-05-30 12:04 ` Marius Bakke
2020-05-26 8:23 ` [bug#41455] [PATCH 1/2] gnu: Add python-pytest-4 Edouard Klein
2020-05-30 12:07 ` Marius Bakke
2020-05-26 8:24 ` [bug#41455] [PATCH 2/2] gnu: Add python-libtmux Edouard Klein
2020-05-30 12:17 ` Marius Bakke
2020-05-26 8:58 ` [bug#41455] [PATCH] gnu: Add python-daemux Edouard Klein
2020-05-30 12:18 ` Marius Bakke
[not found] ` <handler.41455.B.159015302429679.ack@debbugs.gnu.org>
2020-06-03 8:17 ` [bug#41455] Acknowledgement ([PATCH] gnu: Add python-daemux) Edouard Klein
2020-06-03 8:19 ` [bug#41455] [PATCH 1/2] gnu: Add python-libtmux Edouard Klein
2020-06-22 19:49 ` Marius Bakke
2020-06-03 8:20 ` [bug#41455] [PATCH 2/2] gnu: Add python-daemux Edouard Klein
2020-06-22 19:52 ` bug#41455: " Marius Bakke
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.