From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hartmut Goebel Subject: [PATCH] gnu: Add python2-pathlib2. Date: Thu, 13 Oct 2016 11:45:13 +0200 Message-ID: <1476351913-31928-1-git-send-email-h.goebel@crazy-compilers.com> Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42807) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bucZk-0000vq-E8 for guix-devel@gnu.org; Thu, 13 Oct 2016 05:45:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bucZg-0000lV-Dr for guix-devel@gnu.org; Thu, 13 Oct 2016 05:45:20 -0400 Received: from mail-out.m-online.net ([2001:a60:0:28:0:1:25:1]:54517) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bucZg-0000kl-6p for guix-devel@gnu.org; Thu, 13 Oct 2016 05:45:16 -0400 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 3svm6z59SDz3hjd4 for ; Thu, 13 Oct 2016 11:45:15 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.68]) by mail.m-online.net (Postfix) with ESMTP id 3svm6z54bXzvkc8 for ; Thu, 13 Oct 2016 11:45:15 +0200 (CEST) Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.68]) (amavisd-new, port 10024) with ESMTP id r3RgYD4t43AF for ; Thu, 13 Oct 2016 11:45:14 +0200 (CEST) Received: from hermia.goebel-consult.de (ppp-188-174-147-199.dynamic.mnet-online.de [188.174.147.199]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPS for ; Thu, 13 Oct 2016 11:45:14 +0200 (CEST) Received: from lenashee.goebel-consult.de (lenashee.goebel-consult.de [192.168.110.2]) by hermia.goebel-consult.de (Postfix) with ESMTP id 037E7605C1 for ; Thu, 13 Oct 2016 11:45:14 +0200 (CEST) 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 Adding only the Python 2 variant, since for Python 3 our minimum version is 3.4 which already includes this package as part of the standard library. gnu/packages/python.scm (python2-pathlib2): New variable. --- gnu/packages/python.scm | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 6207896..a4c0b92 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -8860,6 +8860,42 @@ anymore.") (define-public python2-pathlib (package-with-python2 python-pathlib)) +(define-public python2-pathlib2 + (package + (name "python2-pathlib2") + (version "2.1.0") + (source (origin + (method url-fetch) + (uri (pypi-uri "pathlib2" version)) + (sha256 + (base32 + "0p050msg5c8d0kadv702jnfshaxrb0il765cpkgnhn6mq5hakcyy")))) + (build-system python-build-system) + (arguments + `(#:python ,python-2)) + (native-inputs + `(("python2-setuptools" ,python2-setuptools) + ("python2-six" ,python2-six))) + (home-page "http://pypi.python.org/pypi/pathlib2/") + (synopsis "Object-oriented file system paths - backport of standard +pathlib module") + (description "The goal of pathlib2 is to provide a backport of standard +pathlib module which tracks the standard library module, so all the newest +features of the standard pathlib can be used also on older Python versions. + +Pathlib offers a set of classes to handle file system paths. It offers the +following advantages over using string objects: + +@enumerate +@item No more cumbersome use of os and os.path functions. Everything can +be done easily through operators, attribute accesses, and method calls. +@item Embodies the semantics of different path types. For example, +comparing Windows paths ignores casing. +@item Well-defined semantics, eliminating any inconsistencies or +ambiguities (forward vs. backward slashes, etc.). +@end enumerate") + (license license:expat))) + (define-public python-jellyfish (package (name "python-jellyfish") -- 2.7.4