From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id IFjwMmuqul5rCAAA0tVLHw (envelope-from ) for ; Tue, 12 May 2020 13:53:47 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id MGUODHqqul7XBgAA1q6Kng (envelope-from ) for ; Tue, 12 May 2020 13:54:02 +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 71780940068 for ; Tue, 12 May 2020 13:53:49 +0000 (UTC) Received: from localhost ([::1]:50974 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jYVLx-0006g2-HY for larch@yhetil.org; Tue, 12 May 2020 09:53:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50944) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jYVKF-0003qR-0A for guix-patches@gnu.org; Tue, 12 May 2020 09:52:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:43064) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jYVKE-0005Se-LY for guix-patches@gnu.org; Tue, 12 May 2020 09:52:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jYVKE-0002HP-GI for guix-patches@gnu.org; Tue, 12 May 2020 09:52:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#41208] [PATCH] gnu: Add python-libtmux Resent-From: Edouard Klein Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 12 May 2020 13:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 41208 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 41208@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.15892915208752 (code B ref -1); Tue, 12 May 2020 13:52:02 +0000 Received: (at submit) by debbugs.gnu.org; 12 May 2020 13:52:00 +0000 Received: from localhost ([127.0.0.1]:54610 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jYVK5-0002Gy-DK for submit@debbugs.gnu.org; Tue, 12 May 2020 09:51:59 -0400 Received: from lists.gnu.org ([209.51.188.17]:49180) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jYVK0-0002Gn-De for submit@debbugs.gnu.org; Tue, 12 May 2020 09:51:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50926) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jYVK0-0003WG-0h for guix-patches@gnu.org; Tue, 12 May 2020 09:51:48 -0400 Received: from sender4-op-o11.zoho.com ([136.143.188.11]:17138) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1jYVJx-0005Rz-6S for guix-patches@gnu.org; Tue, 12 May 2020 09:51:47 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1589291502; cv=none; d=zohomail.com; s=zohoarc; b=W2yAQfz9K1guIcNhOZwGWPEL9Co7GDriOns76cKaWbdfk9JEALGfdsaw+cgTyABgbhtqfyGdIjn+Xf8dM5A5Axa1zoJXYtnVWzyvl63+A57Gs6DVel+J7mJRpqG08+z0Jw8LRv4xjKLowTeFLultwE3OyKSdvxJgN0AWdfQLhT0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1589291502; h=Content-Type:Content-Transfer-Encoding:Date:From:MIME-Version:Message-ID:Subject:To; bh=spQ0E13OkvsAVlc6J1PJqSnbiICJzbkWV3eeksVArtk=; b=aSNkG+csoZMJCuYFSP9MCQLLrDT5Qw3Q5nmq22tTokyp3FU7VDkxVzewXsE7bSgDICA0R8VShjkzheskVakz59ipzNt10U/J2VY80b0Fliw16IDQ8FWtnWgAChKHFGM/3ydU+nzv2rDu42RGBykIQpRclIzN0nYKqjrjaMSgfzg= 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=1589291502; 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=spQ0E13OkvsAVlc6J1PJqSnbiICJzbkWV3eeksVArtk=; b=Qr2wNXPaFHZqE6Dx3/q0iynysdCvM59mz/MJNJvy3Yemn3C6WVTiCIJPtJznUvKh lrStK81HGv/4dVYjU794Qrll2GU5RagMgT+4LyJIuH9J5QByAFl2+vfKuxkWVsVLlPj nv8oXJhUPsqu5FslQiOs3w4BT07dIe8wTmI0tOEM= 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 1589291499957352.51942782430183; Tue, 12 May 2020 06:51:39 -0700 (PDT) User-agent: mu4e 1.4.4; emacs 26.3 From: Edouard Klein Message-ID: <871rnpi7mn.fsf@alice.lan> Date: Tue, 12 May 2020 15:51:28 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External Received-SPF: pass client-ip=136.143.188.11; envelope-from=edk@beaver-labs.com; helo=sender4-op-o11.zoho.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/12 09:51:43 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-Spam-Score: -1.4 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -0.1 (/) 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-Spam: Yes Authentication-Results: aspmx1.migadu.com; dkim=fail (rsa verify failed) header.d=beaver-labs.com header.s=zoho header.b=Qr2wNXPa; 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-Scan-Result: default: False [6.79 / 13.00]; GENERIC_REPUTATION(0.00)[-0.54003567761727]; DWL_DNSWL_FAIL(0.00)[209.51.188.17:server fail]; R_SPF_ALLOW(0.00)[+ip4:209.51.188.0/24:c]; IP_REPUTATION_HAM(0.00)[asn: 22989(0.06), country: US(-0.00), ip: 209.51.188.17(-0.54)]; TO_DN_NONE(0.00)[]; ARC_REJECT(2.00)[signature check failed: fail, {[1] = sig:zohomail.com:reject}]; R_DKIM_REJECT(1.00)[beaver-labs.com:s=zoho]; MX_GOOD(-0.50)[cached: eggs.gnu.org]; DKIM_TRACE(0.00)[beaver-labs.com:-]; MAILLIST(-0.20)[mailman]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; RCVD_IN_DNSWL_FAIL(0.00)[209.51.188.17:server fail]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:22989, ipnet:209.51.188.0/24, country:US]; TAGGED_FROM(0.00)[larch=yhetil.org]; FROM_NEQ_ENVFROM(0.00)[edk@beaver-labs.com,guix-patches-bounces@gnu.org]; RSPAMD_URIBL(4.50)[ftbfs.org:email]; URIBL_BLOCKED(0.00)[waegenei.re:email,leibniz-psychology.org:email,ftbfs.org:email,beaver-labs.com:email,pytest.org:url]; FROM_HAS_DN(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[beaver-labs.com]; HAS_LIST_UNSUB(-0.01)[]; RCPT_COUNT_ONE(0.00)[1]; BAD_REP_POLICIES(0.10)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.51.188.17:from]; RCVD_COUNT_SEVEN(0.00)[10]; FORGED_SENDER_MAILLIST(0.00)[] X-Scanner: scn0 X-Spam-Score: 6.79 X-TUID: GRP7KygVsdRD --- gnu/packages/check.scm | 49 +++++++++++++++++++++++++++++++++++++ gnu/packages/python-xyz.scm | 46 ++++++++++++++++++++++++++++++++++ 2 files changed, 95 insertions(+) diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm index 9971700d2d..2b59a7ec99 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. ;;; @@ -68,6 +69,7 @@ #:use-module (gnu packages python-xyz) #:use-module (gnu packages time) #:use-module (gnu packages xml) + #:use-module (gnu packages version-control) #:use-module (guix utils) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) @@ -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/python-xyz.scm b/gnu/packages/python-xyz.scm index 29b3305e5b..9ec4658523 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -77,6 +77,7 @@ ;;; Copyright =C2=A9 2020 Lars-Dominik Braun ;;; Copyright =C2=A9 2020 Alex ter Weele ;;; Copyright =C2=A9 2020 Matthew Kraai +;;; Copyright =C2=A9 2020 Edouard Klein ;;; ;;; This file is part of GNU Guix. ;;; @@ -167,6 +168,7 @@ #:use-module (gnu packages tcl) #:use-module (gnu packages bdw-gc) #:use-module (gnu packages serialization) + #:use-module (gnu packages tmux) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix git-download) @@ -19889,3 +19891,47 @@ module. @code{cmd2} provides a wealth of features= on top of @code{cmd} to make your life easier and eliminates much of the boilerplate code which wo= uld be necessary when using @code{cmd}.") (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_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))) --=20 2.26.2