From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id KOxvHA+Ry142dwAA0tVLHw (envelope-from ) for ; Mon, 25 May 2020 09:34:07 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id sBeEGA+Ry15/eQAAB5/wlQ (envelope-from ) for ; Mon, 25 May 2020 09:34:07 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id EBADB94014C for ; Mon, 25 May 2020 09:34:06 +0000 (UTC) Received: from localhost ([::1]:40676 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jd9Uj-0004Tb-HV for larch@yhetil.org; Mon, 25 May 2020 05:34:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46588) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jd9Ug-0004TO-6f for guix-patches@gnu.org; Mon, 25 May 2020 05:34:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:56481) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jd9Uf-0006VI-Tn for guix-patches@gnu.org; Mon, 25 May 2020 05:34:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jd9Uf-0006Z3-R6 for guix-patches@gnu.org; Mon, 25 May 2020 05:34:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#41455] [PATCH 1/2] gnu: Add python-libtmux References: <87d06wazez.fsf@alice.lan> In-Reply-To: <87d06wazez.fsf@alice.lan> Resent-From: Edouard Klein Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 25 May 2020 09:34:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41455 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 41455@debbugs.gnu.org Received: via spool by 41455-submit@debbugs.gnu.org id=B41455.159039918425152 (code B ref 41455); Mon, 25 May 2020 09:34:01 +0000 Received: (at 41455) by debbugs.gnu.org; 25 May 2020 09:33:04 +0000 Received: from localhost ([127.0.0.1]:39790 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jd9Td-0006X8-Sm for submit@debbugs.gnu.org; Mon, 25 May 2020 05:33:04 -0400 Received: from sender4-op-o11.zoho.com ([136.143.188.11]:17141) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jd9Tc-0006Wz-0d for 41455@debbugs.gnu.org; Mon, 25 May 2020 05:32:56 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1590399173; cv=none; d=zohomail.com; s=zohoarc; b=ZcZCbD2YYwTICCyhJUNriyH06yB9eUUA6S2ckYAganTBy3xAjyd3H2XxFJPzKI//D7b7Xrf88gxj683R68EZOWyEqUFdCCTIm/ittrfXVN0yOIn752xE4z88KKytTHVEFU9c/J1qdTBXJZ4d3xfv2UysQ5prXaOiWFEoEoq34ow= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590399173; h=Content-Type:Content-Transfer-Encoding:Date:From:MIME-Version:Message-ID:Subject:To; bh=GNTSd1DXavmBjfhMxdEuq4+bKVZkF9P/Kdxd7e9XSH8=; b=mz0KiTlMzp09nA2S62ofnvn0Y++/VErsh+7HyzVItbsNhnPRi2D/s+Bt1v5uJXJE+miXZrZk1AWXU9VyOI5iebVaIkOcmTRY4TElQEtKQGIB0RuAsEW/90SM4ekVr1v9ge0MR5046UqQl9xtuN7I4rh+dcmdcW7phzAVi5g6n5U= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=beaver-labs.com; spf=pass smtp.mailfrom=edk@beaver-labs.com; dmarc=pass header.from= header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1590399173; s=zoho; d=beaver-labs.com; i=edk@beaver-labs.com; h=From:To:Subject:Message-ID:Date:MIME-Version:Content-Type:Content-Transfer-Encoding; bh=GNTSd1DXavmBjfhMxdEuq4+bKVZkF9P/Kdxd7e9XSH8=; b=TJW8ifM/K3/UvpiYHA0TYEYlmbzrodCwvQB6sou4vST5IQarW2vPIsVVS2ER+6Ya 2WLYQebWGppkyTAnF4jFFbEC8C7gBC+aoPV9uh0y9quobG0ihwq3cLqqcydKDvLmMm8 kRb+PsJ7Hyop+hgKY27BGP0j5BOmGFdtZikN8yVo= Received: from alice.lan (lfbn-idf1-1-1299-119.w90-79.abo.wanadoo.fr [90.79.23.119]) by mx.zohomail.com with SMTPS id 1590399171278814.3530029430145; Mon, 25 May 2020 02:32:51 -0700 (PDT) User-agent: mu4e 1.4.6; emacs 26.3 From: Edouard Klein Message-ID: <87y2pgiclc.fsf@alice.lan> Date: Mon, 25 May 2020 11:32:47 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -1.0 (-) X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=fail (rsa verify failed) header.d=beaver-labs.com header.s=zoho header.b=TJW8ifM/; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Spam-Score: 1.99 X-TUID: X8y/t8z5XmGz * 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 =C2=A9 2020 Lars-Dominik Braun ;;; Copyright =C2=A9 2020 Brice Waegeneire ;;; Copyright =C2=A9 2020 Josh Marshall +;;; Copyright =C2=A9 2020 Edouard Klein ;;; ;;; 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)))))) =20 +(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 fixture= s, +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 =C2=A9 2019 Tobias Geerinckx-Rice ;;; Copyright =C2=A9 2019 Oleg Pykhalov ;;; Copyright =C2=A9 2020 Brice Waegeneire +;;; Copyright =C2=A9 2020 Edouard Klein ;;; ;;; 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)) =20 @@ -138,6 +142,50 @@ command and helper commands provided by tmuxifier to m= anage Tmux sessions and windows.") (license license:expat))) =20 +(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_unkno= wn")) + #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 manag= er in python. +It builds upon tmux's target and formats to create an object mapping to tr= averse, + inspect and interact with live tmux sessions.") + (license license:expat))) + (define-public tmux-xpanes (package (name "tmux-xpanes") --=20 2.26.2