From mboxrd@z Thu Jan 1 00:00:00 1970 From: Leo Famulari Subject: [PATCH 08/13] gnu: Add python2-pathlib. Date: Thu, 3 Mar 2016 20:26:34 -0500 Message-ID: <23b6cf1405f881f6d41c8d9025e5b2362d45e1b6.1457054741.git.leo@famulari.name> References: Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38154) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1abeVy-0008PR-Mz for guix-devel@gnu.org; Thu, 03 Mar 2016 20:26:49 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1abeVx-0002XC-1R for guix-devel@gnu.org; Thu, 03 Mar 2016 20:26:46 -0500 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:39196) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1abeVw-0002X8-Tu for guix-devel@gnu.org; Thu, 03 Mar 2016 20:26:44 -0500 Received: from jasmine.lan (c-69-249-5-231.hsd1.pa.comcast.net [69.249.5.231]) by mail.messagingengine.com (Postfix) with ESMTPA id C2388C00022 for ; Thu, 3 Mar 2016 20:26:43 -0500 (EST) In-Reply-To: In-Reply-To: References: 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-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: guix-devel@gnu.org * gnu/packages/python.scm (python-pathlib, python2-pathlib): New variables. --- gnu/packages/python.scm | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index e9969f4..b148c7c 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -8276,3 +8276,37 @@ library.") (package (inherit responses) (native-inputs `(("python2-setuptools" ,python2-setuptools) ,@(package-native-inputs responses)))))) + +(define-public python-pathlib + (package + (name "python-pathlib") + (version "1.0.1") + (source (origin + (method url-fetch) + (uri (pypi-uri "pathlib" version)) + (sha256 + (base32 + "17zajiw4mjbkkv6ahp3xf025qglkj0805m9s41c45zryzj6p2h39")))) + (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (replace 'check + (lambda _ (zero? (system* "python" "./test_pathlib.py"))))))) + (home-page "https://pathlib.readthedocs.org/") + (synopsis "Object-oriented filesystem paths") + (description "Pathlib offers a set of classes to handle filesystem 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\n") + (license license:expat))) + +(define-public python2-pathlib + (package-with-python2 python-pathlib)) -- 2.6.3