diff mbox series

[bug#68191] gnu: Add python-portend.

Message ID 87zfxpdje3.fsf@troyfigiel.com
State New
Headers show
Series [bug#68191] gnu: Add python-portend. | expand

Commit Message

Troy Figiel Jan. 1, 2024, 5:53 p.m. UTC
* gnu/packages/python-web.scm (python-portend): New variable.
---
 gnu/packages/python-web.scm | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)


base-commit: ff586211aaf0e3b468ff3cedc5ede18e8ab529dd

Comments

Sharlatan Hellseher Jan. 4, 2024, 4:10 p.m. UTC | #1
Hi,

It looks good to me, passed all phases from comiit:

guix describe
Generation 498  Jan 04 2024 10:55:58    (current)
  guix 7b0863f
    repository URL: https://git.savannah.gnu.org/git/guix.git
    branch: master
    commit: 7b0863f07a113caef26fea13909bd97d250b629e

guix build --quiet --rounds=2 -L . python-portend
/gnu/store/gl6n6pbk5y1hxv6s8xrj02j0lw41a4ll-python-portend-3.2.0

guix lint -L . python-portend
etching CVE database for 2024...e]...
fetching CVE database for 2023...
fetching CVE database for 2022...
./ffab/packages/python-xyz.scm:557:5: python-portend@3.2.0: source not
archived on Software Heritage and missing from the Disarchive database

It would be nice to start packing python-ruff as it's required for
python-huggingface-hub
 which I try to bring to Guix.

Thanks,
Oleg
-- 
… наш разум - превосходная объяснительная машина которая способна
найти смысл почти в чем угодно, истолковать любой феномен, но
совершенно не в состоянии принять мысль о непредсказуемости.
Troy Figiel Jan. 7, 2024, 10:33 a.m. UTC | #2
Sharlatan Hellseher <sharlatanus@gmail.com> writes:

> Hi,
>
> It looks good to me, passed all phases from comiit:
>
> guix describe
> Generation 498  Jan 04 2024 10:55:58    (current)
>   guix 7b0863f
>     repository URL: https://git.savannah.gnu.org/git/guix.git
>     branch: master
>     commit: 7b0863f07a113caef26fea13909bd97d250b629e
>
> guix build --quiet --rounds=2 -L . python-portend
> /gnu/store/gl6n6pbk5y1hxv6s8xrj02j0lw41a4ll-python-portend-3.2.0
>
> guix lint -L . python-portend
> etching CVE database for 2024...e]...
> fetching CVE database for 2023...
> fetching CVE database for 2022...
> ./ffab/packages/python-xyz.scm:557:5: python-portend@3.2.0: source not
> archived on Software Heritage and missing from the Disarchive database
>
> It would be nice to start packing python-ruff as it's required for
> python-huggingface-hub
>  which I try to bring to Guix.
>
> Thanks,
> Oleg

Hi Oleg,

I have been looking at python-ruff for a bit now. Since it is a Python
package with Rust bindings, it will require a bit more experience
packaging Rust from my side. Plus, we will likely have to add a fair
number of Rust crates first, due to the sheer amount of dependencies.

I was planning to start packaging some of these Rust dependencies, since
we would need these anyway for a recent version of Ruff and the Rust
ecosystem might benefit along the way.

Best wishes,

Troy
Sharlatan Hellseher Jan. 7, 2024, 3:51 p.m. UTC | #3
Pinging Rust-team here, some of the packages might be coveted already.

Thanks,
Oleg
Mathieu Othacehe Jan. 9, 2024, 9:06 a.m. UTC | #4
> * gnu/packages/python-web.scm (python-portend): New variable.

Applied, thanks,

Mathieu
diff mbox series

Patch

diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index 06b578dac7..8eed01c3e2 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -60,6 +60,7 @@ 
 ;;; Copyright © 2022 Baptiste Strazzulla <bstrazzull@hotmail.fr>
 ;;; Copyright © 2023 John Kehayias <john.kehayias@protonmail.com>
 ;;; Copyright © 2023 Ivan Vilata-i-Balaguer <ivan@selidor.net>
+;;; Copyright © 2024 Troy Figiel <troy@troyfigiel.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -201,6 +202,38 @@  (define-public python-lazr-uri
 reusable library for parsing, manipulating, and generating URIs.")
     (license license:lgpl3)))
 
+(define-public python-portend
+  (package
+    (name "python-portend")
+    (version "3.2.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "portend" version))
+       (sha256
+        (base32 "0wpvixicc3d0lack65554mvdrrckkn18p1xcgiv9v5cwq59a6l2j"))))
+    (build-system pyproject-build-system)
+    ;; Do not test pyproject.toml with python-pytest-checkdocs as it tries to
+    ;; download dependencies.
+    (arguments
+     '(#:test-flags '("-k" "not project")))
+    (propagated-inputs (list python-tempora))
+    ;; TODO: Add python-pytest-ruff to native-inputs once it has been packaged.
+    (native-inputs (list python-pytest
+                         python-pytest-black
+                         python-pytest-checkdocs
+                         python-pytest-cov
+                         python-pytest-enabler
+                         python-pytest-mypy))
+    (home-page "https://github.com/jaraco/portend")
+    (synopsis "Monitor TCP ports for bound or unbound states")
+    (description
+     "@code{python-portend} can be used to monitor TCP ports for bound or
+unbound states.  For example, waiting for a port to be occupied or freed
+within a set timeout.  @code{python-portend} can also be used directly from
+the command line.")
+    (license license:expat)))
+
 (define-public python-prawcore
   (package
     (name "python-prawcore")