[PATCH 3/5] gnu: Add python-aiostream.

  • Done
  • quality assurance status badge
Details
3 participants
  • Jelle Licht
  • Vinicius Monego
  • Stefan Reichör
Owner
unassigned
Submitted by
Stefan Reichör
Severity
normal
S
S
Stefan Reichör wrote on 14 May 2021 23:17
(address . guix-patches@gnu.org)(name . Stefan Reichör)(address . stefan@xsteve.at)
20210514211746.143145-3-stefan@xsteve.at
* gnu/packages/python-xyz.scm (python-aiostream): New variable.
---
gnu/packages/python-xyz.scm | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)

Toggle diff (43 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 98368129ed..8e769c08f2 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -20187,6 +20187,36 @@ generators and Python 3.7's context managers into Python 3.5.")
manager compatible with @code{asyncio}.")
(license license:asl2.0)))
+(define-public python-aiostream
+ (package
+ (name "python-aiostream")
+ (version "0.4.3")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "aiostream" version))
+ (sha256
+ (base32
+ "1k33bxrp24pa7c3hygzkv0lqvjil689aj442hzhgzv8vsbqmwd1n"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:tests? #f)) ; tests fail, not sure why
+ ;; (native-inputs
+ ;; `(("python-pytest" ,python-pytest)
+ ;; ("python-pytest-asyncio" ,python-pytest-asyncio)
+ ;; ("python-pytest-cov" ,python-pytest-cov)
+ ;; ("python-pytest-runner" ,python-pytest-runner)))
+ (home-page
+ "https://github.com/vxgmichel/aiostream")
+ (synopsis
+ "Generator-based operators for asynchronous iteration")
+ (description
+ "aiostream provides a collection of stream operators that can be
+combined to create asynchronous pipelines of operations. It can be seen as an
+asynchronous version of itertools, although some aspects are slightly
+different.")
+ (license license:gpl3+)))
+
(define-public python-glob2
(package
(name "python-glob2")
--
2.25.1
V
V
Vinicius Monego wrote on 19 May 2021 00:31
43a07625ab314d5a9f75a0e883de06c889d76c1e.camel@posteo.net
Hi,

Em sex, 2021-05-14 às 23:17 +0200, Stefan Reichör escreveu:
Toggle quote (2 lines)
> * gnu/packages/python-xyz.scm (python-aiostream): New variable.

Thank you.

Toggle quote (17 lines)
>
> +(define-public python-aiostream
> +  (package
> +    (name "python-aiostream")
> +    (version "0.4.3")
> +    (source
> +      (origin
> +        (method url-fetch)
> +        (uri (pypi-uri "aiostream" version))
> +        (sha256
> +          (base32
> +           
> "1k33bxrp24pa7c3hygzkv0lqvjil689aj442hzhgzv8vsbqmwd1n"))))
> +    (build-system python-build-system)
> +    (arguments
> +     `(#:tests? #f)) ; tests fail, not sure why

Tests are not included in the PyPI tarball. That happens often in the
Python ecosystem, and in those cases we fetch directly from the
upstream repository.

After changing the source and adding #:test-target "pytest" to the
arguments (requires python-pytest-runner which is already there), I
could succesfully build the project with tests:

(source
(origin
(method git-fetch)
(uri (git-reference
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32
"1r3x9qwl08yscmzvhafc6gsmq84lr17s6p7a1qxr49cmdvjzsc13"))))
(arguments
`(#:test-target "pytest"))

Note that python-build-system will run "python setup.py test" which is
used for unittest tests. If the project uses Pytest, as many do, we
often have to be explicit in the build either by adding #:test-target
"pytest" to the arguments and python-pytest-runner to native-inputs, or
by replacing the check phase and invoking pytest manually. Since
pytest-runner was deprecated recently, I believe the latter is the
better option from now on. The build could succeed without being
explicit, but you will see a message like "0 tests ran succesfully".
That may have happened in patches 2 and 5 from the series.

Toggle quote (5 lines)
> +    (home-page
> +      "https://github.com/vxgmichel/aiostream")
> +    (synopsis
> +      "Generator-based operators for asynchronous iteration")

We don't break lines for the arguments of home-page and synopsis. The
pypi importer will add them by default, but they should be removed
while editing.

In the description, I'd replace "aiostream" with "@code{aiostream}".

The LICENSE file states GPL 3, though there are no copyright headers to
say "any later version". setup.py also says "gplv3". I'm guessing the
license should be gpl3 only, though I'm not sure about that one.

LGTM otherwise.

Could you check the rest of the series to see if the tests are running
correctly and then send a v2? I am not a committer and can't apply it
myself, so I have to leave that part for somebody else.

Vinicius
S
S
Stefan Reichör wrote on 29 May 2021 22:38
[PATCH] gnu: Add python-aiostream.
(address . 48427@debbugs.gnu.org)(name . Stefan Reichör)(address . stefan@xsteve.at)
20210529203841.157978-1-stefan@xsteve.at
* gnu/packages/python-xyz.scm (python-aiostream): New variable.
---
Vinicius, thanks for your review.
Here is my attempt to follow your hints

gnu/packages/python-xyz.scm | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)

Toggle diff (42 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 9b9510f043..a465ecbda6 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -20232,6 +20232,35 @@ generators and Python 3.7's context managers into Python 3.5.")
manager compatible with @code{asyncio}.")
(license license:asl2.0)))
+(define-public python-aiostream
+ (package
+ (name "python-aiostream")
+ (version "0.4.3")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/vxgmichel/aiostream")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1r3x9qwl08yscmzvhafc6gsmq84lr17s6p7a1qxr49cmdvjzsc13"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:test-target "pytest"))
+ (native-inputs
+ `(("python-pytest" ,python-pytest)
+ ("python-pytest-asyncio" ,python-pytest-asyncio)
+ ("python-pytest-cov" ,python-pytest-cov)
+ ("python-pytest-runner" ,python-pytest-runner)))
+ (home-page "https://github.com/vxgmichel/aiostream")
+ (synopsis "Generator-based operators for asynchronous iteration")
+ (description "aiostream provides a collection of stream operators that can
+be combined to create asynchronous pipelines of operations. It can be seen as
+an asynchronous version of itertools, although some aspects are slightly
+different.")
+ (license license:gpl3)))
+
(define-public python-glob2
(package
(name "python-glob2")
--
2.25.1
J
J
Jelle Licht wrote on 29 May 2023 13:17
Re: bug#48427: [PATCH 3/5] gnu: Add python-aiostream.
(name . Stefan Reichör)(address . stefan@xsteve.at)(address . 48427-done@debbugs.gnu.org)
87jzwro09c.fsf@fsfe.org
Stefan Reichör <stefan@xsteve.at> writes:

Toggle quote (1 lines)
> * gnu/packages/python-xyz.scm (python-aiostream): New variable.
[snip]

Superseded by commit ed18b697c4783f139e23731f5bd0b0ed197997bb, closing.
Closed
?