Subject: bug#30197: closed (Re: [bug#30197] [PATCH] gnu: Add python-yapf.)

From: [email-masked] (GNU bug Tracking System)
Date: Tue, 23 Jan 2018 09:25:02 +0000

Your bug report

#30197: [PATCH] gnu: Add python-yapf.

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
30197: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=30197
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: [bug#30197] [PATCH] gnu: Add python-yapf.
From: [email-masked] (Ludovic Courtès)
To: Fis Trivial <[email-masked]>
Cc: [email-masked]
Date: Tue, 23 Jan 2018 10:24:12 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

Fis Trivial <[email-masked]> skribis:

> * gnu/packages/python.scm (python-yapf, python2-yapf): New variables.

Applied, thanks!

Ludo'.

Subject: [PATCH] gnu: Add python-yapf.
From: Fis Trivial <[email-masked]>
To: "[email-masked]" <[email-masked]>
Date: Sun, 21 Jan 2018 18:37:57 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

* gnu/packages/python.scm (python-yapf, python2-yapf): New variables.
---
 gnu/packages/python.scm | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 9b9b22be2..a78a2f0cf 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -45,6 +45,7 @@
 ;;; Copyright © 2017 Rutger Helling <[email-masked]>
 ;;; Copyright © 2017 Muriithi Frederick Muriuki <[email-masked]>
 ;;; Copyright © 2017 Brendan Tildesley <[email-masked]>
+;;; Copyright © 2018 Fis Trivial <[email-masked]>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -12337,3 +12338,26 @@ and normal mode analysis, but also basic routines for implementing new methods
 for simulation and analysis.  The library is currently not actively maintained
 and works only with Python 2 and NumPy < 1.9.")
     (license license:cecill-c)))
+
+(define-public python-yapf
+  (package
+    (name "python-yapf")
+    (version "0.20.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "yapf" version))
+       (sha256
+        (base32
+         "0s7l6afzxvpx39kzd0lwshlaxw8m4fwh4iy0rlmav4vipr3g46dx"))))
+    (build-system python-build-system)
+    (home-page "https://github.com/google/yapf")
+    (synopsis "Formatter for Python code")
+    (description "YAPF is a formatter for Python code.  It's based off of
+@dfn{clang-format}, developed by Daniel Jasper.  In essence, the algorithm
+takes the code and reformats it to the best formatting that conforms to the
+style guide, even if the original code didn't violate the style guide.")
+    (license license:asl2.0)))
+
+(define-public python2-yapf
+  (package-with-python2 python-yapf))
-- 
2.13.6