From mboxrd@z Thu Jan 1 00:00:00 1970 From: Efraim Flashner Subject: [PATCH 03/16] gnu: Add python-promise. Date: Sun, 11 Sep 2016 21:58:44 +0300 Message-ID: <20160911185857.2123-4-efraim@flashner.co.il> References: <20160911185857.2123-1-efraim@flashner.co.il> Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50168) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bj9yC-00030H-9x for guix-devel@gnu.org; Sun, 11 Sep 2016 14:59:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bj9yA-00088t-B3 for guix-devel@gnu.org; Sun, 11 Sep 2016 14:59:11 -0400 Received: from flashner.co.il ([178.62.234.194]:52845) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bj9yA-000852-4s for guix-devel@gnu.org; Sun, 11 Sep 2016 14:59:10 -0400 Received: from localhost (85.64.232.168.dynamic.barak-online.net [85.64.232.168]) by flashner.co.il (Postfix) with ESMTPSA id AE70D40419 for ; Sun, 11 Sep 2016 18:59:02 +0000 (UTC) In-Reply-To: <20160911185857.2123-1-efraim@flashner.co.il> 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-promise): New variable. --- gnu/packages/python.scm | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 101e7f1..a340604 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -7441,6 +7441,40 @@ asynchronously executing callables. This package backports the concurrent.futures package from Python 3.2") (license license:bsd-3))) +(define-public python-promise + (package + (name "python-promise") + (version "0.4.2") + (source + (origin + (method url-fetch) + (uri (pypi-uri "promise" version)) + (sha256 + (base32 + "1k19ms8l3d5jzjh557rgkxb5sg4mqgfc315rn4hx1z3n8qq6lr3h")))) + (build-system python-build-system) + ;; Tests wants python-futures, which is a python2 only program, and + ;; can't be found by python2-promise at test time. + (arguments `(#:tests? #f)) + (home-page "https://github.com/syrusakbary/promise") + (synopsis "Promises/A+ implementation for Python") + (description + "Promises/A+ implementation for Python") + (properties `((python2-variant . ,(delay python2-promise)))) + (license license:expat))) + +(define-public python2-promise + (let ((promise (package-with-python2 + (strip-python2-variant python-promise)))) + (package (inherit promise) + (arguments (substitute-keyword-arguments (package-arguments promise) + ((#:tests? _) #t))) + (native-inputs + `(("python2-futures" ,python2-futures) + ("python2-pytest" ,python2-pytest) + ("python2-setuptools" ,python2-setuptools) + ,@(package-native-inputs promise)))))) + (define-public python-urllib3 (package (name "python-urllib3") -- 2.10.0