diff mbox series

[bug#60732] Patch update

Message ID ZR0P278MB02684E55FE46B54711C406A3C1A59@ZR0P278MB0268.CHEP278.PROD.OUTLOOK.COM
State New
Headers show
Series [bug#60732] Patch update | expand

Commit Message

Wicki Gabriel (wicg) Feb. 21, 2023, 5:44 p.m. UTC
Hi

Thank you, Andreas, for your review.

When #:tests? #t​ the following output is generated (and the build fails)
> running test
> WARNING: Testing via this command is deprecated and will be removed in a future version. Users looking for a generic test entry point independent of test runner are encouraged to use tox.

I am not sure how to achieve this using our package management system and am not sure if it would be of great gain to do so.

According to the documentation [1] ipython, matplotlib, etc are optional dependencies. I wouldn't include them per se since one can easily invoke a Guix shell providing these.

To test one can invoke a guix shell --pure python-scapy python-ipython​ and run scapy​ manually.


I have adjusted the patch, thank you for your time and effort in advance!
Please let me know if i can improve it some more!

g


1: https://scapy.readthedocs.io/en/latest/installation.html#optional-dependencies
2: https://scapy.net/

Comments

Wicki Gabriel (wicg) Feb. 28, 2023, 1:50 p.m. UTC | #1
Hello Python Team

I'm sorry if you are well-aware of issue 60732 [0], but since i (think i) forgot to CC you on my previous emails i would like to raise awareness of this (probably) easy merge now 🙂

Let me know if I can change anything, i'm happy to do so.

Thank you for your time and effort,
g

[0] https://issues.guix.gnu.org/60732
diff mbox series

Patch

From 0575e799328f93f6c4c5afe893ae10e6e7a9ee28 Mon Sep 17 00:00:00 2001
From: Gabriel Wicki <gabriel@erlikon.ch>
Date: Mon, 9 Jan 2023 16:06:20 +0100
Subject: [PATCH] gnu: Add python-scapy.

* gnu/packages/python-xyz.scm (python-scapy): New variable.
---
 gnu/packages/python-xyz.scm | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 32d826d3c5..d9bee20eb8 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -132,6 +132,7 @@ 
 ;;; Copyright © 2022 Garek Dyszel <garekdyszel@disroot.org>
 ;;; Copyright © 2022 Baptiste Strazzulla <bstrazzull@hotmail.fr>
 ;;; Copyright © 2022 Nicolas Graves <ngraves@ngraves.fr>
+;;; Copyright © 2023 Gabriel Wicki <gabriel@erlikon.ch>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1462,6 +1463,30 @@  (define-public python-psutil
 iotop, uptime, pidof, tty, taskset, pmap.")
     (license license:bsd-3)))
 
+(define-public python-scapy
+  (package
+    (name "python-scapy")
+    (version "2.5.0")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "scapy" version))
+              (sha256
+               (base32
+                "1hpbbmpcn4dwj3z7i7sz4cnbpkaf57p7mvl3p84x9n2gflmhq9jv"))))
+    (arguments
+     '(#:tests? #f)) ;The recommendation is to use tox for testing.
+    (build-system python-build-system)
+    (home-page "https://scapy.net")
+    (synopsis "Python network packet crafting library")
+    (description
+     "Scapy is a Python library and executable for interactively
+manipulating network packets.  It can forge or decode packets of a number
+of protocols, send them on the wire, capture them, store or read them
+using pcap files, match requests and replies, and so on.
+It can handle tasks such as scanning, tracerouting, probing, unit tests,
+attacks or network discovery.")
+    (license license:gpl2)))
+
 (define-public python-shapely
   (package
     (name "python-shapely")
-- 
2.39.1