From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Mon, 19 Jul 2021 09:47:40 +0200 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by lore.white.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1m5O04-0004po-RK for lore@lore.pengutronix.de; Mon, 19 Jul 2021 09:47:40 +0200 Received: from localhost ([127.0.0.1] helo=metis.ext.pengutronix.de) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1m5O04-0003Wr-Cy; Mon, 19 Jul 2021 09:47:40 +0200 Received: from mail-lf1-x12e.google.com ([2a00:1450:4864:20::12e]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1m5Nzl-0003WX-MN for ptxdist@pengutronix.de; Mon, 19 Jul 2021 09:47:22 +0200 Received: by mail-lf1-x12e.google.com with SMTP id g8so22813617lfh.8 for ; Mon, 19 Jul 2021 00:47:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ouaqSv8s8x+qXipS9dhiF2rTk7NY0hFGsn0II3eTrfw=; b=OnMBjR9/Pdzd3jdKLFFVXvr2FT5jfVndzjEaRNHJkg4XqHQ5NfoSngGFGIyhc9YqRm 7OK9CwfnRA+7AWx44aH54JUqIEC9eJr5Ay4BMERg/XQ/+QJSpBvLA+TD9gkyxIzI1Wqn Oa2wk88a2abgGDDtJAFPkJaDxkxXa+ed5F4PCeAIr/SPWfxGGAN4gJ2xfilCPtVzOF4k kcY1hv02m7xhvd5pkg0afkqo5aiiZd+PE80jQkJfU+yNnEpLj9M9nejF2dqwtmSrFZF0 pIj8gEyyUwK8fiWEWT38o9CSp1yJvqx/iJdZXjD4MjuI/XyQhtP1WTsV7rtgPrXuUYb1 ELDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ouaqSv8s8x+qXipS9dhiF2rTk7NY0hFGsn0II3eTrfw=; b=pO1fydMa1EAkvss4uLqYQfL74+nIOIYEhVAWRg6LwOQWFr3CKZckWE7X9QWPYQAKy7 j05l5xx3UHBnYp2jGcytefEnTZDgaz4dgQXZUK6IorSQpFWE5yVNzpvxmKv12jnczw2c b1+nc9b3nzjbWa7agXzjGJSMnHkBG9ZBlMzCbpSySuXAha5/R0YJxB7GlYmmKYKqra4c 91hbR5LGzRzoCB02YPoIbxvgbI8j5hJ7YDmxUDAMv6utJrQekcXyci0+jBGXqaQmT4kt EvWGrAVj0fKnSQuDpsMP/jEYl0qfWB+f1WzkZkwevwvDj7PCAbHEXzA4ilDkt+iErto7 +SFQ== X-Gm-Message-State: AOAM530aj5cvS4iHke8Q5hSIWTXXyxgTS+dNj+XCv0AK2Cv4ZI/MQCtW niYd4EYYtdA2eyh9EV88EwHvqY54IrE= X-Google-Smtp-Source: ABdhPJykvayBmkcC6dCnFlVe2vOMTGyKQl1pd1+H/dcmdc6ZIDvV2Fh1tlsjykFmH+GAlGH0v3KI8g== X-Received: by 2002:a19:771c:: with SMTP id s28mr17012029lfc.358.1626680840695; Mon, 19 Jul 2021 00:47:20 -0700 (PDT) Received: from laped.dk ([185.181.22.4]) by smtp.googlemail.com with ESMTPSA id f26sm2009366ljp.137.2021.07.19.00.47.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Jul 2021 00:47:20 -0700 (PDT) From: Lars Pedersen To: ptxdist@pengutronix.de Date: Mon, 19 Jul 2021 09:47:03 +0200 Message-Id: <20210719074703.25316-1-lapeddk@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210719064816.GF15288@pengutronix.de> References: <20210719064816.GF15288@pengutronix.de> MIME-Version: 1.0 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on metis.ext.pengutronix.de X-Spam-Level: X-Spam-Status: No, score=-2.2 required=4.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Subject: [ptxdist] [PATCH v3] python3-pysnmp: new package X-BeenThere: ptxdist@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Cc: Lars Pedersen Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "ptxdist" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: ptxdist-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false 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 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 --- rules/python3-pysnmp.in | 13 +++++++++ rules/python3-pysnmp.make | 55 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 68 insertions(+) create mode 100644 rules/python3-pysnmp.in create mode 100644 rules/python3-pysnmp.make diff --git a/rules/python3-pysnmp.in b/rules/python3-pysnmp.in new file mode 100644 index 000000000..09e9b2b0a --- /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 000000000..cb08668b3 --- /dev/null +++ b/rules/python3-pysnmp.make @@ -0,0 +1,55 @@ +# -*-makefile-*- +# +# Copyright (C) 2021 by Lars Pedersen +# +# 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 ") + @$(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 -- 2.31.1 _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de