GNU bug report logs - #51676
[PATCH] gnu: Add python-miniupnpc

Previous Next

Package: guix-patches;

Reported by: Stephen Paul Weber <singpolyma <at> singpolyma.net>

Date: Mon, 8 Nov 2021 03:42:02 UTC

Severity: normal

Tags: patch

Done: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 51676 in the body.
You can then email your comments to 51676 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#51676; Package guix-patches. (Mon, 08 Nov 2021 03:42:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Stephen Paul Weber <singpolyma <at> singpolyma.net>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Mon, 08 Nov 2021 03:42:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Stephen Paul Weber <singpolyma <at> singpolyma.net>
To: guix-patches <at> gnu.org
Cc: Stephen Paul Weber <singpolyma <at> singpolyma.net>
Subject: [PATCH] gnu: Add python-miniupnpc
Date: Sun,  7 Nov 2021 22:41:17 -0500
* gnu/packages/python-xyz.scm (python-miniupnpc): New variable.
---
 gnu/packages/python-xyz.scm | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 8ba72170c0..558e104cf1 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -3093,6 +3093,42 @@ server.")
      "@code{pafy} is a python library to retrieve YouTube content and metadata.")
     (license license:lgpl3+)))
 
+(define-public python-miniupnpc
+  (package
+    (name "python-miniupnpc")
+    (version "2.2.3")
+    (source
+     (origin
+       (method git-fetch)
+       (uri
+        (git-reference
+         (url "https://github.com/miniupnp/miniupnp")
+         (commit "36a65e3d841d4e85904fed690c0b755d5b380043")))
+       (file-name
+        (git-file-name name version))
+       (sha256
+        (base32 "0h7smsp1fnwsmgg3n70813ln9j5y20g61x25s4kn91vzkbbq9188"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'subdir
+           (lambda _
+             (chdir "miniupnpc")
+             (setenv "CC" ,(cc-for-target))
+             (substitute* "Makefile"
+               (("SH = /bin/sh") (string-append "SH = " (which "bash"))))
+             #t)))))
+    (inputs
+     `(("python" ,python))) ; We are building a Python extension.
+    (native-inputs
+     `(("which" ,which)))
+    (synopsis "UPnP client for Python")
+    (description "A client library for Python programs to set up port forwards
+using UPnP.")
+    (home-page "http://miniupnp.free.fr")
+    (license license:bsd-3)))
+
 (define-public python2-funcsigs
   (package
     (name "python2-funcsigs")
-- 
2.30.2




Information forwarded to guix-patches <at> gnu.org:
bug#51676; Package guix-patches. (Wed, 17 Nov 2021 15:34:02 GMT) Full text and rfc822 format available.

Message #8 received at 51676 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Stephen Paul Weber <singpolyma <at> singpolyma.net>
Cc: 51676 <at> debbugs.gnu.org
Subject: Re: bug#51676: [PATCH] gnu: Add python-miniupnpc
Date: Wed, 17 Nov 2021 16:33:12 +0100
Hi Stephen,

Stephen Paul Weber <singpolyma <at> singpolyma.net> skribis:

> * gnu/packages/python-xyz.scm (python-miniupnpc): New variable.

[...]

> +    (version "2.2.3")
> +    (source
> +     (origin
> +       (method git-fetch)
> +       (uri
> +        (git-reference
> +         (url "https://github.com/miniupnp/miniupnp")
> +         (commit "36a65e3d841d4e85904fed690c0b755d5b380043")))

This commit:

--8<---------------cut here---------------start------------->8---
$ (cd /tmp/miniupnp/; git checkout 36a65e3d841d4e85904fed690c0b755d5b380043; git describe)
La posició de HEAD anterior era 2df8120 miniupnpc version 2.2.3
HEAD ara és a 36a65e3 miniupnpc/Changelog.txt: VERSION 2.2.3
miniupnpd_2_1-574-g36a65e3
--8<---------------cut here---------------end--------------->8---

… does not match the tag for 2.2.3:

--8<---------------cut here---------------start------------->8---
$ (cd /tmp/miniupnp/; git checkout miniupnpc_2_2_3; git log |head -1)
La posició de HEAD anterior era 36a65e3 miniupnpc/Changelog.txt: VERSION 2.2.3
HEAD ara és a 2df8120 miniupnpc version 2.2.3
commit 2df8120326ed4246e049a7a6de707539604cd514
--8<---------------cut here---------------end--------------->8---

> +    (description "A client library for Python programs to set up port forwards
> +using UPnP.")

Please make it a full sentence, as per:

  https://guix.gnu.org/manual/en/html_node/Synopses-and-Descriptions.html

Could you send an updated patch that addresses these two issues?

Thanks,
Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#51676; Package guix-patches. (Fri, 14 Jan 2022 01:11:01 GMT) Full text and rfc822 format available.

Message #11 received at 51676 <at> debbugs.gnu.org (full text, mbox):

From: Stephen Paul Weber <singpolyma <at> singpolyma.net>
To: 51676 <at> debbugs.gnu.org
Cc: Stephen Paul Weber <singpolyma <at> singpolyma.net>
Subject: [PATCH v2] gnu: Add python-miniupnpc
Date: Thu, 13 Jan 2022 20:09:54 -0500
* gnu/packages/python-xyz.scm (python-miniupnpc): New variable.
---
 gnu/packages/python-xyz.scm | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 0091165d37..0ad5dfd85c 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -3150,6 +3150,40 @@ server.")
      "@code{pafy} is a python library to retrieve YouTube content and metadata.")
     (license license:lgpl3+)))
 
+(define-public python-miniupnpc
+  (package
+    (name "python-miniupnpc")
+    (version "2.2.3")
+    (source
+     (origin
+       (method git-fetch)
+       (uri
+        (git-reference
+         (url "https://github.com/miniupnp/miniupnp")
+         (commit "miniupnpc_2_2_3")))
+       (file-name
+        (git-file-name name version))
+       (sha256
+        (base32 "0h7smsp1fnwsmgg3n70813ln9j5y20g61x25s4kn91vzkbbq9188"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'subdir
+           (lambda _
+             (chdir "miniupnpc")
+             (setenv "CC" ,(cc-for-target))
+             (substitute* "Makefile"
+               (("SH = /bin/sh") (string-append "SH = " (which "bash"))))
+             #t)))))
+    (inputs (list python)) ; We are building a Python extension.
+    (native-inputs (list which))
+    (synopsis "UPnP client for Python")
+    (description "Miniupnpc is a client library for Python programs to set up
+port forwards using UPnP.")
+    (home-page "http://miniupnp.free.fr")
+    (license license:bsd-3)))
+
 (define-public python2-funcsigs
   (package
     (name "python2-funcsigs")
-- 
2.30.2




Information forwarded to guix-patches <at> gnu.org:
bug#51676; Package guix-patches. (Wed, 09 Feb 2022 14:08:01 GMT) Full text and rfc822 format available.

Message #14 received at 51676 <at> debbugs.gnu.org (full text, mbox):

From: Xinglu Chen <public <at> yoctocell.xyz>
To: Stephen Paul Weber <singpolyma <at> singpolyma.net>, 51676 <at> debbugs.gnu.org
Cc: Stephen Paul Weber <singpolyma <at> singpolyma.net>
Subject: Re: [bug#51676] [PATCH v2] gnu: Add python-miniupnpc
Date: Wed, 09 Feb 2022 15:07:47 +0100
[Message part 1 (text/plain, inline)]
Stephen schrieb am Donnerstag der 13. Januar 2022 um 20:09 -05:

> * gnu/packages/python-xyz.scm (python-miniupnpc): New variable.
> ---
>  gnu/packages/python-xyz.scm | 34 ++++++++++++++++++++++++++++++++++
>  1 file changed, 34 insertions(+)
>
> diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
> index 0091165d37..0ad5dfd85c 100644
> --- a/gnu/packages/python-xyz.scm
> +++ b/gnu/packages/python-xyz.scm
> @@ -3150,6 +3150,40 @@ server.")
>       "@code{pafy} is a python library to retrieve YouTube content and metadata.")
>      (license license:lgpl3+)))
>  
> +(define-public python-miniupnpc
> +  (package
> +    (name "python-miniupnpc")
> +    (version "2.2.3")
> +    (source
> +     (origin
> +       (method git-fetch)
> +       (uri
> +        (git-reference
> +         (url "https://github.com/miniupnp/miniupnp")
> +         (commit "miniupnpc_2_2_3")))

The version should not be hard-coded.  You could use
‘string-replace-substring’ from (ice-9 string-fun).

  (string-replace-substring version "." "_")


> +       (file-name
> +        (git-file-name name version))
> +       (sha256
> +        (base32 "0h7smsp1fnwsmgg3n70813ln9j5y20g61x25s4kn91vzkbbq9188"))))

I am getting a hash mismatch

--8<---------------cut here---------------start------------->8---
expected hash: 0h7smsp1fnwsmgg3n70813ln9j5y20g61x25s4kn91vzkbbq9188
actual hash:   03q1rlzvfzm15g1bfw2zqzavlsyaypnaf2k3cz6ha7k5rirkdy0l
--8<---------------cut here---------------end--------------->8---

> +    (build-system python-build-system)
> +    (arguments
> +     `(#:phases
> +       (modify-phases %standard-phases
> +         (add-after 'unpack 'subdir
> +           (lambda _
> +             (chdir "miniupnpc")
> +             (setenv "CC" ,(cc-for-target))
> +             (substitute* "Makefile"
> +               (("SH = /bin/sh") (string-append "SH = " (which "bash"))))

Nitpick: Could we just match on /bin/sh?

> +             #t)))))

Phases don’t have to return #t.

> +    (inputs (list python)) ; We are building a Python extension.
> +    (native-inputs (list which))
> +    (synopsis "UPnP client for Python")
> +    (description "Miniupnpc is a client library for Python programs to set up
> +port forwards using UPnP.")

Acronyms should be expanded at least once, see “17.4.4 Synopses and
Descriptions” in the manual.

  @acronym{UPnP, Universal Plug and Play}
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#51676; Package guix-patches. (Wed, 09 Feb 2022 14:58:01 GMT) Full text and rfc822 format available.

Message #17 received at 51676 <at> debbugs.gnu.org (full text, mbox):

From: Stephen Paul Weber <singpolyma <at> singpolyma.net>
To: 51676 <at> debbugs.gnu.org
Cc: Stephen Paul Weber <singpolyma <at> singpolyma.net>
Subject: [PATCH v3] gnu: Add python-miniupnpc
Date: Wed,  9 Feb 2022 09:57:08 -0500
* gnu/packages/python-xyz.scm (python-miniupnpc): New variable.
---
 gnu/packages/python-xyz.scm | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 537a2eef35..dccaa7b103 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -3156,6 +3156,41 @@ server.")
      "@code{pafy} is a python library to retrieve YouTube content and metadata.")
     (license license:lgpl3+)))
 
+(define-public python-miniupnpc
+  (package
+    (name "python-miniupnpc")
+    (version "2.2.3")
+    (source
+     (origin
+       (method git-fetch)
+       (uri
+        (git-reference
+         (url "https://github.com/miniupnp/miniupnp")
+         (commit
+           (string-append
+             "miniupnpc_" (string-replace-substring version "." "_")))))
+       (file-name
+        (git-file-name name version))
+       (sha256
+        (base32 "03q1rlzvfzm15g1bfw2zqzavlsyaypnaf2k3cz6ha7k5rirkdy0l"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'subdir
+           (lambda _
+             (chdir "miniupnpc")
+             (setenv "CC" ,(cc-for-target))
+             (substitute* "Makefile"
+               (("/bin/sh") (which "bash"))))))))
+    (inputs (list python)) ; We are building a Python extension.
+    (native-inputs (list which))
+    (synopsis "UPnP client for Python")
+    (description "Miniupnpc is a client library for Python programs to set up
+port forwards using @acronym{UPnP, Universal Plug and Play}.")
+    (home-page "http://miniupnp.free.fr")
+    (license license:bsd-3)))
+
 (define-public python2-funcsigs
   (package
     (name "python2-funcsigs")
-- 
2.30.2




Reply sent to Nicolas Goaziou <mail <at> nicolasgoaziou.fr>:
You have taken responsibility. (Tue, 15 Feb 2022 22:14:01 GMT) Full text and rfc822 format available.

Notification sent to Stephen Paul Weber <singpolyma <at> singpolyma.net>:
bug acknowledged by developer. (Tue, 15 Feb 2022 22:14:02 GMT) Full text and rfc822 format available.

Message #22 received at 51676-done <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
To: Stephen Paul Weber <singpolyma <at> singpolyma.net>
Cc: 51676-done <at> debbugs.gnu.org
Subject: Re: [bug#51676] [PATCH v3] gnu: Add python-miniupnpc
Date: Tue, 15 Feb 2022 23:13:34 +0100
Hello,

Stephen Paul Weber <singpolyma <at> singpolyma.net> writes:

> * gnu/packages/python-xyz.scm (python-miniupnpc): New variable.

I removed `which' native-inputs, used G-expressions, and
`search-input-files' instead of `which' function.

Applied. Thank you

Regards,
-- 
Nicolas Goaziou




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 16 Mar 2022 11:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 39 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.