From patchwork Thu Nov 9 20:47:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 34210 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 71789C4332F for ; Thu, 9 Nov 2023 20:47:59 +0000 (UTC) Received: from mail-lf1-f53.google.com (mail-lf1-f53.google.com [209.85.167.53]) by mx.groups.io with SMTP id smtpd.web11.9326.1699562876459836243 for ; Thu, 09 Nov 2023 12:47:56 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@bgdev-pl.20230601.gappssmtp.com header.s=20230601 header.b=aUfCn7gg; spf=none, err=SPF record not found (domain: bgdev.pl, ip: 209.85.167.53, mailfrom: brgl@bgdev.pl) Received: by mail-lf1-f53.google.com with SMTP id 2adb3069b0e04-507e85ebf50so1653086e87.1 for ; Thu, 09 Nov 2023 12:47:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20230601.gappssmtp.com; s=20230601; t=1699562874; x=1700167674; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=ZmiZ6ca0gnMjZ9K1+XwQRE0gSKb3132pAtC1FMi4sxY=; b=aUfCn7ggsuHgXjmZzilUJGFyxDFlze0wlmRq5Zh9zIa2jzH95HCJOXulYSXRr8GQGy tkUlmC7vgmW0rtq6/4ohJTRGbjlGXbN9UXeO12VjviIbbRHX8cEkgDvT0zgrfoktr0W/ 6kA8sBp3IPYDuw6qu61pwAAYB6yKlIlpSPTR6PVzXEem983zEA8BCKPKPp4CB7IV8qOV Sq9ezCvXLw80KyKrbSBBAXkHjdSF8oZqH0p5W3MeHetF4KDSAfjuvwmpM9QKAjCJ5xme 4mZYuBn93xMf6lD3gZTIk6pSWftOC/QujUZRvHdIOet7+Pqv+EVN3LB2vJ7Ul2/RPNNQ +rig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699562874; x=1700167674; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=ZmiZ6ca0gnMjZ9K1+XwQRE0gSKb3132pAtC1FMi4sxY=; b=riy1HfV8MA/xmeiSTgkcs4iQH7y9ogzdSBAYVvNfjm0nf96eeT6z0gGFm/jdarvVQV c5zAMF2NoXOtHji/aw3brwGI0G9VYIGASKyzeQ2OAD1dQzYqgGj8i57axPW+2lyDKg8t J5SeuJINB2aGFcsceTq78toSxkB84ByNmew8SJOXiKnX4VHNgHVbvmJ0j8sRmV6vXQwz 0yrpUHvagbnybzTDciVLAlwDlyP0OB2+5gZ5m2zmJWxTeGQE+kNxkKSXbVg1yO7T5+ql eYX6pV1GWbSWEVdyBCmrzPqlvMkHKITsI8ksQrjUWSoyuq7bQYsDzI4UPasb3sJbB8rr 9i8w== X-Gm-Message-State: AOJu0Yz/Stg75z3qbx2bZM5NpPdeyk0TxdPqSrWtnQnBcNlTKn6nut37 SqLePBRTAOyn3YOraWKUO9qQ5g== X-Google-Smtp-Source: AGHT+IEk/SsFwWnjas4R1rW4AenYHhcCkkFdowBU6YdR8WOCGUk9VrcTFeGaI1NuatThMw4T/Jv0jg== X-Received: by 2002:ac2:4aca:0:b0:50a:40b6:2d37 with SMTP id m10-20020ac24aca000000b0050a40b62d37mr213706lfp.40.1699562874282; Thu, 09 Nov 2023 12:47:54 -0800 (PST) Received: from brgl-uxlite.home ([2a01:cb1d:334:ac00:51dd:d4a3:ac1:10ae]) by smtp.gmail.com with ESMTPSA id f1-20020a5d50c1000000b0032f7eaa6e43sm437931wrt.79.2023.11.09.12.47.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Nov 2023 12:47:53 -0800 (PST) From: Bartosz Golaszewski To: Khem Raj , Bruce Ashfield , openembedded-devel@lists.openembedded.org Cc: Bartosz Golaszewski Subject: [meta-python][PATCH] python3-gpiod: update to v2.1.3 Date: Thu, 9 Nov 2023 21:47:47 +0100 Message-Id: <20231109204747.44268-1-brgl@bgdev.pl> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 09 Nov 2023 20:47:59 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-devel/message/106520 From: Bartosz Golaszewski The python bindings for libgpiod have undergone several significant changes that make them easier to use for users of pip. The libgpiod sources are now vendored with the python3-gpiod as the biggest complaint by far was the fact that if the system doesn't provide the correct version of libgpiod, the python bindings won't build. This is however irrelevant for the meta-python recipe as we use the provided switch to keep linking against the libgpiod provided by meta-openembedded. We have changed the way the tests are built, they are now generated by a separate build script and no longer by setup.py. The package now correctly build with the preferred pep517 method so change the inherited classes. We have also gained control over the gpiod module on pypi (which previously hosted a pure python GPIO library) so the location of the sources has changed. Signed-off-by: Bartosz Golaszewski --- ...-gpiod_2.0.1.bb => python3-gpiod_2.1.3.bb} | 25 ++++++++++++------- 1 file changed, 16 insertions(+), 9 deletions(-) rename meta-python/recipes-devtools/python/{python3-gpiod_2.0.1.bb => python3-gpiod_2.1.3.bb} (54%) diff --git a/meta-python/recipes-devtools/python/python3-gpiod_2.0.1.bb b/meta-python/recipes-devtools/python/python3-gpiod_2.1.3.bb similarity index 54% rename from meta-python/recipes-devtools/python/python3-gpiod_2.0.1.bb rename to meta-python/recipes-devtools/python/python3-gpiod_2.1.3.bb index ea8c18562..ef2f01fd4 100644 --- a/meta-python/recipes-devtools/python/python3-gpiod_2.0.1.bb +++ b/meta-python/recipes-devtools/python/python3-gpiod_2.1.3.bb @@ -3,17 +3,18 @@ SUMMARY = "Python bindings for libgpiod." LICENSE = "GPL-2.0-or-later & LGPL-2.1-or-later & CC-BY-SA-4.0" # The actual license files live in the upstream libgpiod from which the pypi # package is spun out. -LIC_FILES_CHKSUM = "file://setup.py;beginline=57;endline=57;md5=120334ed83ec0cb248605e775bd13b87" +LIC_FILES_CHKSUM = "file://setup.py;beginline=237;endline=237;md5=f5ddb56912b7f20bf94aa4d1bdcd3533" SRC_URI += "file://run-ptest" -SRC_URI[sha256sum] = "d5c0f9502e97e7359b9dd601e29f15d668983ce50f5c13323f3302845f790fa6" +SRC_URI[sha256sum] = "a33193d6cab79d252329f71666a35a3668e04f1f82bf9b93ee2c9ae852398b20" -inherit setuptools3 ptest pypi +inherit setuptools3-base python_pep517 ptest pypi -PYPI_PACKAGE = "libgpiod" - -DEPENDS += "libgpiod" +DEPENDS += " \ + libgpiod \ + python3-setuptools-native \ +" RDEPENDS:${PN} += " \ libgpiod (>= 2.0) \ python3-datetime \ @@ -24,14 +25,20 @@ RDEPENDS:${PN}-ptest += " \ python3-setuptools \ " -export GPIOD_WITH_TESTS = "${@bb.utils.contains("PTEST_ENABLED", "1", "1", "0", d)}" +export LINK_SYSTEM_LIBGPIOD = "1" + +do_compile_ptest() { + ${STAGING_BINDIR_NATIVE}/python3-native/python3 build_tests.py +} do_install_ptest() { install -d ${D}${PTEST_PATH}/gpiod-test/gpiosim install -d ${D}${PTEST_PATH}/gpiod-test/procname install -m 0644 ${S}/tests/*.py ${D}${PTEST_PATH}/gpiod-test/ - install -m 0644 ${B}/build/lib*/tests/gpiosim/_ext* ${D}${PTEST_PATH}/gpiod-test/gpiosim + install -m 0644 ${B}/tests/gpiosim/_ext* ${D}${PTEST_PATH}/gpiod-test/gpiosim install -m 0644 ${S}/tests/gpiosim/*.py ${D}${PTEST_PATH}/gpiod-test/gpiosim - install -m 0644 ${B}/build/lib*/tests/procname/_ext* ${D}${PTEST_PATH}/gpiod-test/procname + install -m 0644 ${B}/tests/procname/_ext* ${D}${PTEST_PATH}/gpiod-test/procname install -m 0644 ${S}/tests/procname/*.py ${D}${PTEST_PATH}/gpiod-test/procname } + +INSANE_SKIP:${PN}-ptest += "buildpaths"