From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: [PATCH 05/16] gnu: Add python-testpath. Date: Tue, 1 Nov 2016 13:20:35 +0100 Message-ID: <20161101122046.751-6-ricardo.wurmus@mdc-berlin.de> References: <20161101122046.751-1-ricardo.wurmus@mdc-berlin.de> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55138) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c1Y4R-0001Ss-6n for guix-devel@gnu.org; Tue, 01 Nov 2016 08:21:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c1Y4O-0003Co-2d for guix-devel@gnu.org; Tue, 01 Nov 2016 08:21:39 -0400 Received: from sinope02.bbbm.mdc-berlin.de ([141.80.25.24]:44786) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c1Y4N-0003Cc-Rs for guix-devel@gnu.org; Tue, 01 Nov 2016 08:21:35 -0400 Received: from localhost (localhost [127.0.0.1]) by sinope02.bbbm.mdc-berlin.de (Postfix) with ESMTP id F1EBD67C98A for ; Tue, 1 Nov 2016 13:21:34 +0100 (CET) Received: from sinope02.bbbm.mdc-berlin.de ([127.0.0.1]) by localhost (sinope02.bbbm.mdc-berlin.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id skshh7ZedNzL for ; Tue, 1 Nov 2016 13:21:29 +0100 (CET) Received: from HTCAONE.mdc-berlin.net (puck.citx.mdc-berlin.de [141.80.36.101]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by sinope02.bbbm.mdc-berlin.de (Postfix) with ESMTPS for ; Tue, 1 Nov 2016 13:21:29 +0100 (CET) In-Reply-To: <20161101122046.751-1-ricardo.wurmus@mdc-berlin.de> 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-testpath, python2-testpath): New variables. --- gnu/packages/python.scm | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 9785b5e..e6f537e 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -4583,6 +4583,48 @@ installing kernelspecs for use with Jupyter frontends.") (define-public python2-ipykernel (package-with-python2 python-ipykernel)) + +(define-public python-testpath + (package + (name "python-testpath") + (version "0.2") + (source + (origin + (method url-fetch) + (uri (string-append "https://github.com/jupyter/testpath/archive/" + version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "04kh3fgvmqz6cfcw79q70qwjz7ib7lxm27cc548iy2rpr33qqf55")))) + (build-system python-build-system) + (arguments + `(#:tests? #f ; this package does not even have a setup.py + #:phases + (modify-phases %standard-phases + (delete 'install) + (replace 'build + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((dir (string-append + (assoc-ref outputs "out") + "/lib/python" + (string-take (string-take-right + (assoc-ref inputs "python") 5) 3) + "/site-packages/testpath"))) + (mkdir-p dir) + (copy-recursively "testpath" dir)) + #t))))) + (home-page "https://github.com/takluyver/testpath") + (synopsis "Test utilities for code working with files and commands") + (description + "Testpath is a collection of utilities for Python code working with files +and commands. It contains functions to check things on the filesystem, and +tools for mocking system commands and recording calls to those.") + (license license:expat))) + +(define-public python2-testpath + (package-with-python2 python-testpath)) + (define-public python-ipython (package (name "python-ipython") -- 2.10.1