diff mbox series

[bug#55637] gnu: Add python-pylink-square.

Message ID 60db9b9dbccfc6522f1e3e28ff51d0ea74457fad.1653591259.git.peter@polidoro.io
State Accepted
Headers show
Series [bug#55637] gnu: Add python-pylink-square. | 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

Peter Polidoro May 26, 2022, 6:55 p.m. UTC
From: Peter Polidoro <peter@polidoro.io>

* gnu/packages/embedded.scm (python-pylink-square): New variable.
---
 gnu/packages/embedded.scm | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

Comments

Christopher Baines May 27, 2022, 9:26 a.m. UTC | #1
peter@polidoro.io writes:

> From: Peter Polidoro <peter@polidoro.io>
>
> * gnu/packages/embedded.scm (python-pylink-square): New variable.
> ---
>  gnu/packages/embedded.scm | 31 +++++++++++++++++++++++++++++++
>  1 file changed, 31 insertions(+)
>
> diff --git a/gnu/packages/embedded.scm b/gnu/packages/embedded.scm
> index 010f5b84d2..75675c2698 100644
> --- a/gnu/packages/embedded.scm
> +++ b/gnu/packages/embedded.scm
> @@ -1699,3 +1699,34 @@ (define-public mbed-tools
>  connected by USB, checkout Mbed projects and perform builds amongst other
>  operations.")
>      (license license:asl2.0)))
> +
> +(define-public python-pylink-square
> +  (package
> +    (name "python-pylink-square")
> +    (version "0.12.0")
> +    (source
> +     ;; The tests suite appears to be incomplete in the PyPI archive.
> +     (origin
> +       (method git-fetch)
> +       (uri (git-reference
> +             (url "http://www.github.com/Square/pylink")
> +             (commit (string-append "v" version))))
> +       (file-name (git-file-name name version))
> +       (sha256
> +        (base32 "0w0pi91gvaw9k2r267kpc1ryd74v19iq5ysn4j7pf4g2069gbgxf"))))
> +    (build-system python-build-system)
> +    (arguments
> +     `(#:phases (modify-phases %standard-phases
> +                  (add-after 'unpack 'patch-setup
> +                    (lambda _
> +                      (substitute* "setup.py"
> +                        (("mock == 2.0.0") "mock")))))))
> +    (native-inputs (list python-mock))
> +    (propagated-inputs (list python-future
> +                             python-psutil
> +                             python-six
> +                             libjaylink))
> +    (home-page "http://www.github.com/Square/pylink")
> +    (synopsis "Python interface for SEGGER J-Link.")
> +    (description "Python interface for SEGGER J-Link.")
> +    (license license:asl2.0)))

The description here also looks like it could be improved a bit.

Are you able to send some updated patches?

Also, when sending a few related patches, it's helpful if you get git
send-email to send them as a series, so something like:

  git send-email HEAD~3

To send patches for the last 3 commits.
Peter Polidoro May 27, 2022, 2:50 p.m. UTC | #2
Christopher Baines <mail@cbaines.net> writes:

> The description here also looks like it could be improved a bit.
>
> Are you able to send some updated patches?
>
> Also, when sending a few related patches, it's helpful if you 
> get git
> send-email to send them as a series, so something like:
>
>   git send-email HEAD~3
>
> To send patches for the last 3 commits.

Thank you for your great suggestions, I will send updated patches 
as soon as I get a chance.

I misnamed this patch series. I thought, at first, that I was 
adding more dependencies to the 'west' package, but that is not 
quite correct.

West is a Python tool that can help build Zephyr RTOS projects. 
West is only optional for building Zephyr RTOS projects, though, 
and much of its functionality could perhaps be replaced by Guix. 
West provides a multiple repository management system, inspired by 
Google's Repo tool and Git submodules. I think it would be much 
more elegant to use Guix for managing the multiple repositories 
and their dependencies instead of West. I do not yet know enough 
about how the Zephyr ecosystem works, nor am I yet a good enough 
Guix package writer, to figure out how to replace totally replace 
West with Guix.

An intermediate step might be for me to create a simple Zephyr 
package that installs the dependencies needed to build Zephyr 
projects. Normally these dependencies are installed using apt 
packages and Python requirements.txt files, as you can see in this 
Zephyr getting started guide:

https://docs.zephyrproject.org/latest/develop/getting_started/index.html

I am not yet sure how many dependencies I will need to write Guix 
packages for and how long it will take. Should I just keep 
emailing patches to this debbug number until I get to the final 
zephyr package patch or is that annoying? Would you prefer I wait 
until I have all of the packages figured out and then send them 
all as one big patch series using git send-email as you suggested?

On a side note, do you happen to know how to setup git send-email 
to work with pass, the standard unix password manager, instead of 
the normal .git-credentials file? I would prefer not having my 
password stored in a plain text file in my home directory. I tried 
following this guide, but could not get it to work:

https://ryanlue.com/posts/2019-04-19-git-credential-with-pass

Thank you for your time!
diff mbox series

Patch

diff --git a/gnu/packages/embedded.scm b/gnu/packages/embedded.scm
index 010f5b84d2..75675c2698 100644
--- a/gnu/packages/embedded.scm
+++ b/gnu/packages/embedded.scm
@@ -1699,3 +1699,34 @@  (define-public mbed-tools
 connected by USB, checkout Mbed projects and perform builds amongst other
 operations.")
     (license license:asl2.0)))
+
+(define-public python-pylink-square
+  (package
+    (name "python-pylink-square")
+    (version "0.12.0")
+    (source
+     ;; The tests suite appears to be incomplete in the PyPI archive.
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "http://www.github.com/Square/pylink")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0w0pi91gvaw9k2r267kpc1ryd74v19iq5ysn4j7pf4g2069gbgxf"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases (modify-phases %standard-phases
+                  (add-after 'unpack 'patch-setup
+                    (lambda _
+                      (substitute* "setup.py"
+                        (("mock == 2.0.0") "mock")))))))
+    (native-inputs (list python-mock))
+    (propagated-inputs (list python-future
+                             python-psutil
+                             python-six
+                             libjaylink))
+    (home-page "http://www.github.com/Square/pylink")
+    (synopsis "Python interface for SEGGER J-Link.")
+    (description "Python interface for SEGGER J-Link.")
+    (license license:asl2.0)))