From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ben Woodcroft Subject: [PATCH 1/2] gnu: Add python-pyqi. Date: Sun, 24 Apr 2016 22:27:39 +1000 Message-ID: <1461500860-8272-2-git-send-email-donttrustben@gmail.com> References: <1461500860-8272-1-git-send-email-donttrustben@gmail.com> Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54976) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1auJAW-0004j6-UY for Guix-devel@gnu.org; Sun, 24 Apr 2016 08:29:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1auJAT-0007VB-NR for Guix-devel@gnu.org; Sun, 24 Apr 2016 08:29:44 -0400 Received: from mail-pa0-f67.google.com ([209.85.220.67]:35045) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1auJAT-0007V6-I2 for Guix-devel@gnu.org; Sun, 24 Apr 2016 08:29:41 -0400 Received: by mail-pa0-f67.google.com with SMTP id zy2so15235431pac.2 for ; Sun, 24 Apr 2016 05:29:41 -0700 (PDT) Received: from localhost.localdomain ([103.25.181.216]) by smtp.googlemail.com with ESMTPSA id zs16sm11248433pab.13.2016.04.24.05.28.53 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 24 Apr 2016 05:28:55 -0700 (PDT) In-Reply-To: <1461500860-8272-1-git-send-email-donttrustben@gmail.com> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Guix-devel@gnu.org * gnu/packages/python.scm (python-pyqi, python2-pyqi): New variables. --- gnu/packages/python.scm | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 8ae7566..2436a1f 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -8626,6 +8626,54 @@ GnuPG encryption, and more. It also supports management of Amazon's CloudFront content delivery network.") (license gpl2+))) +(define-public python-pyqi + (package + (name "python-pyqi") + (version "0.3.2") + (source + (origin + (method url-fetch) + ;; Use GitHub as source because PyPI archive does not contain tests. + (uri (string-append "https://github.com/biocore/pyqi/archive/" + version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "085gi3xr9q1py2nl96ry9fnb20kba5h1zkxzqrkd5dl3g7xdwvlw")))) + (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-before 'build 'remove-version-requirement + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "setup.py" + (("if ver not in \\['2.7', '3.3'\\]:") + (string-append + "if ver not in ['2.7', '3.3', '" + (string-take (string-take-right + (assoc-ref inputs "python") 5) 3) + "']:"))))) + (replace 'check + (lambda _ (zero? (system* "nosetests"))))))) + (native-inputs + `(("python-nose" ,python-nose))) + (home-page "http://bipy.github.io/pyqi") + (synopsis "Wrapping commands in multiple interfaces") + (description "pyqi is a Python framework designed to support wrapping +general commands in multiple types of interfaces, including at the command +line, HTML and API levels. A @dfn{command} is a class that takes some inputs, +performs some function, and produces some outputs. An @dfn{interface} is a +light wrapper around that command that makes it accessible to users.") + (license bsd-3) + (properties `((python2-variant . ,(delay python2-pyqi)))))) + +(define-public python2-pyqi + (let ((base (package-with-python2 (strip-python2-variant python-pyqi)))) + (package + (inherit base) + (native-inputs `(("python2-setuptools" ,python2-setuptools) + ,@(package-native-inputs base)))))) + (define-public python-pkgconfig (package (name "python-pkgconfig") -- 2.5.0