Message ID | 20220611202700.5655-1-jgart@dismail.de |
---|---|
State | New |
Headers | show |
Series | [bug#55896,v2] gnu: Add python-pybare. | expand |
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 |
jgart schreef op za 11-06-2022 om 15:27 [-0500]: > +(define-public python-pybare > + (package > + (name "python-pybare") > + (version "0.1.1") > + (source > + (origin > + (method git-fetch) > + (uri > + (git-reference > + (url "https://git.sr.ht/~chiefnoah/pybare") > + (commit (string-append "v" version)))) > + (file-name (git-file-name name version)) > + (sha256 > + (base32 "1ibmwwf1rdxlwyxlzhv3v1i0ybsqg0kppim90sm8rsbns86yy4by")))) > + (build-system python-build-system) > + (arguments > + (list #:phases > + #~(modify-phases %standard-phases > + (replace 'check > + (lambda* (#:key tests? #:allow-other-keys) > + (when tests? > + (chdir "bare") > + (invoke "pytest" "-vv" "."))))))) > + (native-inputs > + (list python-pytest)) > + (home-page "https://sr.ht/~chiefnoah/PyBARE/") > + (synopsis "Declarative implementation of BARE for Python") > + (description > +"@code{python-pybare} is a general purpose library for strongly typed > +primitives in Python that supports serializing to and from @acronym{BARE, > +Binary Application Record Encoding} messages.") > + (license license:expat Package definition LGTM, but I have only looked at the definition, not the sources etc.
On Sun, 12 Jun 2022 17:41:57 +0200 Maxime Devos <maximedevos@telenet.be> wrote: > jgart schreef op za 11-06-2022 om 15:27 [-0500]: > > +(define-public python-pybare > > + (package > > + (name "python-pybare") > > + (version "0.1.1") > > + (source > > + (origin > > + (method git-fetch) > > + (uri > > + (git-reference > > + (url "https://git.sr.ht/~chiefnoah/pybare") > > + (commit (string-append "v" version)))) > > + (file-name (git-file-name name version)) > > + (sha256 > > + (base32 "1ibmwwf1rdxlwyxlzhv3v1i0ybsqg0kppim90sm8rsbns86yy4by")))) > > + (build-system python-build-system) > > + (arguments > > + (list #:phases > > + #~(modify-phases %standard-phases > > + (replace 'check > > + (lambda* (#:key tests? #:allow-other-keys) > > + (when tests? > > + (chdir "bare") > > + (invoke "pytest" "-vv" "."))))))) > > + (native-inputs > > + (list python-pytest)) > > + (home-page "https://sr.ht/~chiefnoah/PyBARE/") > > + (synopsis "Declarative implementation of BARE for Python") > > + (description > > +"@code{python-pybare} is a general purpose library for strongly typed > > +primitives in Python that supports serializing to and from @acronym{BARE, > > +Binary Application Record Encoding} messages.") > > + (license license:expat > > > Package definition LGTM, but I have only looked at the definition, not > the sources etc. Hi Maxime, no worries. Take your time. The review is much appreciated. I just looked at the sources again myself and noticed that the tests use pre-generated BARE binaries to test against. See here: https://git.sr.ht/~chiefnoah/pybare/tree/master/item/bare/test_encoder.py#L225 and here: https://git.sr.ht/~chiefnoah/pybare/tree/master/item/bare/_examples Should I ask the author if they can provide a way to generate those binaries for testing instead of vendoring the pre-compiled binaries without their sources? all best, jgart
Hello, jgart <jgart@dismail.de> writes: [...] > Hi Maxime, no worries. Take your time. The review is much appreciated. > > I just looked at the sources again myself and noticed that the tests > use pre-generated BARE binaries to test against. > > See here: > > https://git.sr.ht/~chiefnoah/pybare/tree/master/item/bare/test_encoder.py#L225 > > and here: > > https://git.sr.ht/~chiefnoah/pybare/tree/master/item/bare/_examples > > Should I ask the author if they can provide a way to generate those > binaries for testing instead of vendoring the pre-compiled binaries > without their sources? Yes, please ask. Otherwise, we'll have to delete the binaries from unknown source in a source snippet and not run the test suite... Thank you! Maxim
On Thu, 07 Jul 2022 16:33:20 -0400 Maxim Cournoyer <maxim.cournoyer@gmail.com> wrote: > Hello, > > jgart <jgart@dismail.de> writes: > > [...] > > > Hi Maxime, no worries. Take your time. The review is much appreciated. > > > > I just looked at the sources again myself and noticed that the tests > > use pre-generated BARE binaries to test against. > > > > See here: > > > > https://git.sr.ht/~chiefnoah/pybare/tree/master/item/bare/test_encoder.py#L225 > > > > and here: > > > > https://git.sr.ht/~chiefnoah/pybare/tree/master/item/bare/_examples > > > > Should I ask the author if they can provide a way to generate those > > binaries for testing instead of vendoring the pre-compiled binaries > > without their sources? > > Yes, please ask. Otherwise, we'll have to delete the binaries from > unknown source in a source snippet and not run the test suite... I asked already. But I'll have to do some more research. The author mentioned that they go the binaries from Drew Devault's implementation of the same library in golang. I think Drew Devault is also vendoring the binaries iirc. TODO: So, I'll have to contact Drew and ask him if he can generate the binaries instead of vendoring them in. all best, jgart
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 4104472848..5109434cbf 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -29418,6 +29418,39 @@ (define-public python-gatt Currently, Linux is the only platform supported by this library.") (license license:expat))) +(define-public python-pybare + (package + (name "python-pybare") + (version "0.1.1") + (source + (origin + (method git-fetch) + (uri + (git-reference + (url "https://git.sr.ht/~chiefnoah/pybare") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1ibmwwf1rdxlwyxlzhv3v1i0ybsqg0kppim90sm8rsbns86yy4by")))) + (build-system python-build-system) + (arguments + (list #:phases + #~(modify-phases %standard-phases + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (chdir "bare") + (invoke "pytest" "-vv" "."))))))) + (native-inputs + (list python-pytest)) + (home-page "https://sr.ht/~chiefnoah/PyBARE/") + (synopsis "Declarative implementation of BARE for Python") + (description +"@code{python-pybare} is a general purpose library for strongly typed +primitives in Python that supports serializing to and from @acronym{BARE, +Binary Application Record Encoding} messages.") + (license license:expat))) + (define-public python-musical-scales (package (name "python-musical-scales")