From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Craven Subject: [PATCH 03/11] gnu: Add python-binaryornot. Date: Mon, 22 Aug 2016 15:20:10 +0200 Message-ID: <20160822132018.19828-3-david@craven.ch> References: <20160822132018.19828-1-david@craven.ch> Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55978) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bbp9e-0007wc-Du for guix-devel@gnu.org; Mon, 22 Aug 2016 09:20:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bbp9X-00056z-NN for guix-devel@gnu.org; Mon, 22 Aug 2016 09:20:41 -0400 Received: from so254-10.mailgun.net ([198.61.254.10]:51940) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bbp9W-00055v-FC for guix-devel@gnu.org; Mon, 22 Aug 2016 09:20:35 -0400 In-Reply-To: <20160822132018.19828-1-david@craven.ch> 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-binaryornot): New variable. (python2-binaryornot): New variable. --- gnu/packages/python.scm | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 1742dc8..c184fd3 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -9981,3 +9981,34 @@ hardware-accelerated multitouch applications.") (define-public python2-kivy-next (package-with-python2 python-kivy-next)) + +(define-public python-binaryornot + (package + (name "python-binaryornot") + (version "0.4.0") + (source (origin + (method url-fetch) + (uri (pypi-uri "binaryornot" version)) + (sha256 + (base32 + "1j4f51dxic39mdwf6alj7gd769wy6mhk916v031wjali51xkh3xb")))) + (build-system python-build-system) + (inputs + `(("python-chardet" ,python-chardet) + ("python-hypothesis" ,python-hypothesis))) + (home-page "https://github.com/audreyr/binaryornot") + (synopsis "Package to check if a file is binary or text") + (description "Ultra-lightweight pure Python package to check if a file is +binary or text.") + (license license:bsd-3) + (properties `((python2-variant . ,(delay python2-binaryornot)))))) + +(define-public python2-binaryornot + (let ((base (package-with-python2 (strip-python2-variant python-binaryornot)))) + (package (inherit base) + (native-inputs + `(("python2-setuptools" ,python2-setuptools) + ,@(package-native-inputs base))) + (inputs + `(("python2-enum34" ,python2-enum34) + ,@(package-inputs base)))))) -- 2.9.0