unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] gnu: Add python2-pathlib2.
@ 2016-10-13  9:45 Hartmut Goebel
  2016-10-26 12:46 ` Efraim Flashner
  0 siblings, 1 reply; 3+ messages in thread
From: Hartmut Goebel @ 2016-10-13  9:45 UTC (permalink / raw)
  To: guix-devel

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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] gnu: Add python2-pathlib2.
  2016-10-13  9:45 [PATCH] gnu: Add python2-pathlib2 Hartmut Goebel
@ 2016-10-26 12:46 ` Efraim Flashner
  2016-10-27  8:10   ` Hartmut Goebel
  0 siblings, 1 reply; 3+ messages in thread
From: Efraim Flashner @ 2016-10-26 12:46 UTC (permalink / raw)
  To: Hartmut Goebel; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 2706 bytes --]

On Thu, Oct 13, 2016 at 11:45:13AM +0200, Hartmut Goebel wrote:
> 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
> 
> 

This looks good to me. I'd add a comment near the arguments like the one
at the top as to why its python2- only.

-- 
Efraim Flashner   <efraim@flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] gnu: Add python2-pathlib2.
  2016-10-26 12:46 ` Efraim Flashner
@ 2016-10-27  8:10   ` Hartmut Goebel
  0 siblings, 0 replies; 3+ messages in thread
From: Hartmut Goebel @ 2016-10-27  8:10 UTC (permalink / raw)
  To: Efraim Flashner; +Cc: guix-devel

Am 26.10.2016 um 14:46 schrieb Efraim Flashner:
> This looks good to me. I'd add a comment near the arguments like the one
> at the top as to why its python2- only.

Thanks for the suggestion. I added it.

-- 
Regards
Hartmut Goebel

| Hartmut Goebel          | h.goebel@crazy-compilers.com               |
| www.crazy-compilers.com | compilers which you thought are impossible |

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-10-27  8:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-13  9:45 [PATCH] gnu: Add python2-pathlib2 Hartmut Goebel
2016-10-26 12:46 ` Efraim Flashner
2016-10-27  8:10   ` Hartmut Goebel

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).