From: Xinglu Chen <public@yoctocell.xyz>
To: Stephen Paul Weber <singpolyma@singpolyma.net>, 51676@debbugs.gnu.org
Cc: Stephen Paul Weber <singpolyma@singpolyma.net>
Subject: [bug#51676] [PATCH v2] gnu: Add python-miniupnpc
Date: Wed, 09 Feb 2022 15:07:47 +0100 [thread overview]
Message-ID: <87leykw2to.fsf@yoctocell.xyz> (raw)
In-Reply-To: <20220114010954.28886-1-singpolyma@singpolyma.net>
[-- Attachment #1: Type: text/plain, Size: 2472 bytes --]
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}
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 861 bytes --]
next prev parent reply other threads:[~2022-02-09 14:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-08 3:41 [bug#51676] [PATCH] gnu: Add python-miniupnpc Stephen Paul Weber
2021-11-17 15:33 ` Ludovic Courtès
2022-01-14 1:09 ` [bug#51676] [PATCH v2] " Stephen Paul Weber
2022-02-09 14:07 ` Xinglu Chen [this message]
2022-02-09 14:57 ` [bug#51676] [PATCH v3] " Stephen Paul Weber
2022-02-15 22:13 ` bug#51676: " Nicolas Goaziou
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87leykw2to.fsf@yoctocell.xyz \
--to=public@yoctocell.xyz \
--cc=51676@debbugs.gnu.org \
--cc=singpolyma@singpolyma.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.