mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Michael Olbrich <m.olbrich@pengutronix.de>
To: ptxdist@pengutronix.de
Cc: Lars Pedersen <lapeddk@gmail.com>
Subject: Re: [ptxdist] [APPLIED] python3-pysnmp: new package
Date: Thu, 22 Jul 2021 14:12:54 +0200
Message-ID: <20210722121254.4113606-1-m.olbrich@pengutronix.de> (raw)
In-Reply-To: <20210719074703.25316-1-lapeddk@gmail.com>

Thanks, applied as 00a10dfa5f1029850b4e29550e0ca2b9d13f1e88.

Michael

[sent from post-receive hook]

On Thu, 22 Jul 2021 14:12:53 +0200, Lars Pedersen <lapeddk@gmail.com> wrote:
> Got a runtime error so py files are installed instead of pyc
> 
> Traceback (most recent call last):
>   File "/usr/bin/snmptrap.py", line 237, in <module>
>   snmpEngine = engine.SnmpEngine()
>   File "/usr/lib/python3.7/site-packages/pysnmp/entity/engine.py", line 63, in __init__
>   File "/usr/lib/python3.7/site-packages/pysnmp/proto/rfc3412.py", line 32, in __init__
>   File "/usr/lib/python3.7/site-packages/pysnmp/smi/builder.py", line 401, in loadModules
>   File "/usr/lib/python3.7/site-packages/pysnmp/smi/builder.py", line 341, in loadModule
>   File "/usr/lib/python3.7/site-packages/pysnmp/smi/builder.py", line 143, in read
>   ValueError: bad marshal data (unknown type code)
> 
> Signed-off-by: Lars Pedersen <lapeddk@gmail.com>
> Message-Id: <20210719074703.25316-1-lapeddk@gmail.com>
> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
> 
> diff --git a/rules/python3-pysnmp.in b/rules/python3-pysnmp.in
> new file mode 100644
> index 000000000000..09e9b2b0a5cd
> --- /dev/null
> +++ b/rules/python3-pysnmp.in
> @@ -0,0 +1,13 @@
> +## SECTION=python3
> +
> +config PYTHON3_PYSNMP
> +	bool
> +	prompt "pysnmp"
> +	select PYTHON3
> +	select HOST_PYTHON3_SETUPTOOLS
> +	select PYTHON3_PLY
> +	select PYTHON3_PYASN1
> +	select PYTHON3_PYCRYPTODOMEX
> +	select PYTHON3_PYSMI
> +	help
> +	  pySNMP is a cross-platform, pure-Python SNMP engine implementation.
> diff --git a/rules/python3-pysnmp.make b/rules/python3-pysnmp.make
> new file mode 100644
> index 000000000000..cb08668b33be
> --- /dev/null
> +++ b/rules/python3-pysnmp.make
> @@ -0,0 +1,55 @@
> +# -*-makefile-*-
> +#
> +# Copyright (C) 2021 by Lars Pedersen <lapeddk@gmail.com>
> +#
> +# For further information about the PTXdist project and license conditions
> +# see the README file.
> +#
> +
> +#
> +# We provide this package
> +#
> +PACKAGES-$(PTXCONF_PYTHON3_PYSNMP) += python3-pysnmp
> +
> +#
> +# Paths and names
> +#
> +PYTHON3_PYSNMP_VERSION	:= 4.4.12
> +PYTHON3_PYSNMP_MD5	:= 2222880259daf6e2cb322e938c818276
> +PYTHON3_PYSNMP		:= pysnmp-$(PYTHON3_PYSNMP_VERSION)
> +PYTHON3_PYSNMP_SUFFIX 	:= tar.gz
> +PYTHON3_PYSNMP_URL	:= $(call ptx/mirror-pypi, pysnmp, $(PYTHON3_PYSNMP).$(PYTHON3_PYSNMP_SUFFIX))
> +PYTHON3_PYSNMP_SOURCE	:= $(SRCDIR)/$(PYTHON3_PYSNMP).$(PYTHON3_PYSNMP_SUFFIX)
> +PYTHON3_PYSNMP_DIR	:= $(BUILDDIR)/$(PYTHON3_PYSNMP)
> +PYTHON3_PYSNMP_LICENSE	:= BSD-2-Clause
> +PYTHON3_PYSNMP_LICENSE_FILES := \
> +	file://LICENSE.rst;md5=b15d29f500f748d1c2a15709769090a8
> +
> +# ----------------------------------------------------------------------------
> +# Prepare
> +# ----------------------------------------------------------------------------
> +
> +PYTHON3_PYSNMP_CONF_TOOL	:= python3
> +
> +# ----------------------------------------------------------------------------
> +# Target-Install
> +# ----------------------------------------------------------------------------
> +
> +$(STATEDIR)/python3-pysnmp.targetinstall:
> +	@$(call targetinfo)
> +
> +	@$(call install_init, python3-pysnmp)
> +	@$(call install_fixup, python3-pysnmp,PRIORITY,optional)
> +	@$(call install_fixup, python3-pysnmp,SECTION,base)
> +	@$(call install_fixup, python3-pysnmp,AUTHOR,"Lars Pedersen <lapeddk@gmail.com>")
> +	@$(call install_fixup, python3-pysnmp,DESCRIPTION,missing)
> +
> +	# Install py files instead of pyc because of runtime marshal error
> +	@$(call install_glob,python3-pysnmp, 0, 0, -, \
> +		/usr/lib/python$(PYTHON3_MAJORMINOR)/site-packages,, *.pyc)
> +
> +	@$(call install_finish, python3-pysnmp)
> +
> +	@$(call touch)
> +
> +# vim: syntax=make

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de


  reply	other threads:[~2021-07-22 12:13 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-12 11:09 [ptxdist] [PATCH v2 1/4] python3-pyasn1: " Lars Pedersen
2021-07-12 11:09 ` [ptxdist] [PATCH v2 2/4] python3-pysmi: " Lars Pedersen
2021-07-16 10:23   ` Michael Olbrich
2021-07-16 12:24     ` Lars Pedersen
2021-07-16 12:40       ` Michael Olbrich
2021-07-22 12:12   ` [ptxdist] [APPLIED] " Michael Olbrich
2021-07-12 11:09 ` [ptxdist] [PATCH v2 3/4] python3-pysnmp: " Lars Pedersen
2021-07-16 12:41   ` Michael Olbrich
2021-07-16 12:53     ` Lars Pedersen
2021-07-16 13:02       ` Michael Olbrich
2021-07-18 19:03         ` Lars Pedersen
2021-07-19  6:48           ` Michael Olbrich
2021-07-19  7:47             ` [ptxdist] [PATCH v3] " Lars Pedersen
2021-07-22 12:12               ` Michael Olbrich [this message]
2021-07-12 11:09 ` [ptxdist] [PATCH v2 4/4] python3-snmpclitools: " Lars Pedersen
2021-07-22 12:12   ` [ptxdist] [APPLIED] " Michael Olbrich
2021-07-22 12:12 ` [ptxdist] [APPLIED] python3-pyasn1: " Michael Olbrich

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=20210722121254.4113606-1-m.olbrich@pengutronix.de \
    --to=m.olbrich@pengutronix.de \
    --cc=lapeddk@gmail.com \
    --cc=ptxdist@pengutronix.de \
    /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

mailarchive of the ptxdist mailing list

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://lore.ptxdist.org/ptxdist/0 ptxdist/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ptxdist ptxdist/ https://lore.ptxdist.org/ptxdist \
		ptxdist@pengutronix.de
	public-inbox-index ptxdist

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git