Skip to contentSkip to conversation

python3-varlink: Add recipe

PATCH In review Omri Sarig 3 participants 5 messages Mar 21, 2025 – Jun 19, 2025

lore
Share & tools
lore

Omri Sarig

author
#0 lore raw

PATCH v3 1/1 python3-varlink: Add recipe

Add a python recipe to install the python implementation for the varlink interface.

The recipe is using the current master head, instead of the version from pypi or a tagged version. This is done as the pypi and tagged versions are quite old, while the master is continuously maintained in GitHub. The version set for the package is based upon the last tagged commit in the tree, with the addition of git.
As the last tagged version is old, the recipe name is based over git, instead of adding the old tag version to the file name.

The runtime dependencies were created by looking at all the import statement in the installed files of the repository and taking the relevant packages from the python3 manifest file in meta-poky. Unfortunately, python-varlink does not have different installation candidates for testing or example code - meaning that when the package is install through setuptools, the test code is part of the target system.
This causes the runtime dependencies to contain some packages (like python3-unittest) which are not needed during regular operation of the system, assuming the user will not want to run test or example code. However, as these files are installed in the system, and are used as the reference example, we've decided to keep the runtime dependencies as-is. Future work on this package can be done to split the runtime dependencies to different parts (main and test for example), and modify the installed files on the system according to the user wishes.

---
 .../ptest-packagelists-meta-python.inc        |  1 +
 .../python/python3-varlink_git.bb             | 30 +++++++++++++++++++
 2 files changed, 31 insertions(+)
 create mode 100644 meta-python/recipes-devtools/python/python3-varlink_git.bb
meta-python/conf/include/ptest-packagelists-meta-python.inc +1 -0
index 3a1fb13ba7..40df4f08f3 100644
@@ -89,6 +89,7 @@ PTESTS_FAST_META_PYTHON = "\
     python3-unidiff \
     python3-uritemplate \
     python3-validators \
+    python3-varlink \
     python3-wrapt \
     python3-wsproto \
     python3-xlrd \
meta-python/recipes-devtools/python/python3-varlink_git.bb new file +30 -0
new file mode 100644
index 0000000000..b50bfac379
@@ -0,0 +1,30 @@
+SUMMARY = " Python implementation of the Varlink protocol"
+HOMEPAGE = "https://varlink.org/python/"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=e3fc50a88d0a364313df4b21ef20c29e"
+
+SRC_URI = "git://github.com/varlink/python.git;protocol=https;branch=master"
+
+SRCREV = "6012b8805bf2ebcc981c84bd56a3e949a2141c16"
+
+PV = "30.3.1+git"
+
+S = "${WORKDIR}/git"
+
+inherit python_setuptools_build_meta ptest-python-pytest
+
+DEPENDS += "python3-setuptools-scm-native"
+
+RDEPENDS:${PN} += " \
+    python3-core \
+    python3-datetime \
+    python3-io \
+    python3-json \
+    python3-netclient \
+    python3-netserver \
+    python3-shell \
+    python3-stringold \
+    python3-unittest \
+"
+
+PTEST_PYTEST_DIR = "varlink/tests"
#1 lore raw
Quoted 71 lines · Omri Sarig via lists.openembedded.org

Add a python recipe to install the python implementation for the varlink interface.

The recipe is using the current master head, instead of the version from pypi or a tagged version. This is done as the pypi and tagged versions are quite old, while the master is continuously maintained in GitHub. The version set for the package is based upon the last tagged commit in the tree, with the addition of git.
As the last tagged version is old, the recipe name is based over git, instead of adding the old tag version to the file name.

The runtime dependencies were created by looking at all the import statement in the installed files of the repository and taking the relevant packages from the python3 manifest file in meta-poky. Unfortunately, python-varlink does not have different installation candidates for testing or example code - meaning that when the package is install through setuptools, the test code is part of the target system.
This causes the runtime dependencies to contain some packages (like python3-unittest) which are not needed during regular operation of the system, assuming the user will not want to run test or example code. However, as these files are installed in the system, and are used as the reference example, we've decided to keep the runtime dependencies as-is. Future work on this package can be done to split the runtime dependencies to different parts (main and test for example), and modify the installed files on the system according to the user wishes.

---
 .../ptest-packagelists-meta-python.inc        |  1 +
 .../python/python3-varlink_git.bb             | 30 +++++++++++++++++++
 2 files changed, 31 insertions(+)
 create mode 100644 meta-python/recipes-devtools/python/python3-varlink_git.bb
meta-python/conf/include/ptest-packagelists-meta-python.inc +1 -0
index 3a1fb13ba7..40df4f08f3 100644
@@ -89,6 +89,7 @@ PTESTS_FAST_META_PYTHON = "\
     python3-unidiff \
     python3-uritemplate \
     python3-validators \
+    python3-varlink \
     python3-wrapt \
     python3-wsproto \
     python3-xlrd \
meta-python/recipes-devtools/python/python3-varlink_git.bb new file +18 -0
new file mode 100644
index 0000000000..b50bfac379
@@ -0,0 +1,30 @@
+SUMMARY = " Python implementation of the Varlink protocol"
+HOMEPAGE = "https://varlink.org/python/"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=e3fc50a88d0a364313df4b21ef20c29e"
+
+SRC_URI = "git://github.com/varlink/python.git;protocol=https;branch=master"
+
+SRCREV = "6012b8805bf2ebcc981c84bd56a3e949a2141c16"
+
+PV = "30.3.1+git"
+
+S = "${WORKDIR}/git"
+
+inherit python_setuptools_build_meta ptest-python-pytest
+
+DEPENDS += "python3-setuptools-scm-native"
+
+RDEPENDS:${PN} += " \

meta-python/recipes-devtools/python/python3-varlink_git.bb line 28

Quoted 10 lines
meta-python/recipes-devtools/python/python3-varlink_git.bb new file +10 -0
+    python3-core \
+    python3-datetime \
+    python3-io \
+    python3-json \
+    python3-netclient \
+    python3-netserver \
+    python3-shell \
+    python3-stringold \
+    python3-unittest \
+"

I think some of the rdeps here are only needed to run ptests, they should be moved to RDEPENDS:${PN}-ptest rdeps

Quoted 11 lines
meta-python/recipes-devtools/python/python3-varlink_git.bb new file +2 -1
+
+PTEST_PYTEST_DIR = "varlink/tests"
 
-=-=-=-=-=-=-=-=-=-=-=-

Links: You receive all messages sent to this group.
View/Reply Online (#116174): https://lists.openembedded.org/g/openembedded-devel/message/116174
Mute This Topic: https://lists.openembedded.org/mt/111824890/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

author
#2 lore raw
Quoted 76 lines · Khem Raj
Quoted 74 lines · Omri Sarig via lists.openembedded.org

Add a python recipe to install the python implementation for the varlink interface.

The recipe is using the current master head, instead of the version from pypi or a tagged version. This is done as the pypi and tagged versions are quite old, while the master is continuously maintained in GitHub. The version set for the package is based upon the last tagged commit in the tree, with the addition of git.
As the last tagged version is old, the recipe name is based over git, instead of adding the old tag version to the file name.

The runtime dependencies were created by looking at all the import statement in the installed files of the repository and taking the relevant packages from the python3 manifest file in meta-poky. Unfortunately, python-varlink does not have different installation candidates for testing or example code - meaning that when the package is install through setuptools, the test code is part of the target system.
This causes the runtime dependencies to contain some packages (like python3-unittest) which are not needed during regular operation of the system, assuming the user will not want to run test or example code. However, as these files are installed in the system, and are used as the reference example, we've decided to keep the runtime dependencies as-is. Future work on this package can be done to split the runtime dependencies to different parts (main and test for example), and modify the installed files on the system according to the user wishes.

---
  .../ptest-packagelists-meta-python.inc        |  1 +
  .../python/python3-varlink_git.bb             | 30 +++++++++++++++++++
  2 files changed, 31 insertions(+)

create mode 100644 meta-python/recipes-devtools/python/python3-varlink_git.bb

meta-python/conf/include/ptest-packagelists-meta-python.inc +1 -0
index 3a1fb13ba7..40df4f08f3 100644
@@ -89,6 +89,7 @@ PTESTS_FAST_META_PYTHON = "\
      python3-unidiff \
      python3-uritemplate \
      python3-validators \
+    python3-varlink \
      python3-wrapt \
      python3-wsproto \
      python3-xlrd \
meta-python/recipes-devtools/python/python3-varlink_git.bb new file +22 -0
new file mode 100644
index 0000000000..b50bfac379
@@ -0,0 +1,30 @@
+SUMMARY = " Python implementation of the Varlink protocol"
+HOMEPAGE = "https://varlink.org/python/"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=e3fc50a88d0a364313df4b21ef20c29e"
+
+SRC_URI = "git://github.com/varlink/python.git;protocol=https;branch=master"
+
+SRCREV = "6012b8805bf2ebcc981c84bd56a3e949a2141c16"
+
+PV = "30.3.1+git"
+
+S = "${WORKDIR}/git"
+
+inherit python_setuptools_build_meta ptest-python-pytest
+
+DEPENDS += "python3-setuptools-scm-native"
+
+RDEPENDS:${PN} += " \
+    python3-core \
+    python3-datetime \
+    python3-io \
+    python3-json \
Quoted 8 lines

meta-python/recipes-devtools/python/python3-varlink_git.bb line 28

Quoted 6 lines
meta-python/recipes-devtools/python/python3-varlink_git.bb new file +6 -0
+    python3-netclient \
+    python3-netserver \
+    python3-shell \
+    python3-stringold \
+    python3-unittest \
+"

I think some of the rdeps here are only needed to run ptests, they should be moved to RDEPENDS:${PN}-ptest rdeps

Thanks for the fast reply.

The problem is that the python-varlink repository installs the test files as part of the package (so it'll be available in /usr/lib/python3.12/site-packages/varlink/tests/ on the target), and these files also contains the example code for the repository.

I've discussed exactly that issue with @peter marko on the second version of the patch here:
https://lists.openembedded.org/g/openembedded-devel/message/116172

If you still think that we should split that, and have some solution for the installed tests directory (either leave it there, without allowing the user to run-it, or manually remove them from the installation), I can do that. Please let me know.

Quoted 13 lines
Quoted 13 lines
meta-python/recipes-devtools/python/python3-varlink_git.bb new file +2 -1
+
+PTEST_PYTEST_DIR = "varlink/tests"
 
-=-=-=-=-=-=-=-=-=-=-=-

Links: You receive all messages sent to this group.
View/Reply Online (#116174): https://lists.openembedded.org/g/openembedded-devel/message/116174
Mute This Topic: https://lists.openembedded.org/mt/111824890/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#3 lore raw
Quoted 48 lines · Omri Sarig via lists.openembedded.org
Quoted 22 lines · Khem Raj
Quoted 8 lines · Omri Sarig via lists.openembedded.org

Add a python recipe to install the python implementation for the varlink
interface.

---

Quoted 11 lines

+RDEPENDS:${PN} += " \
+    python3-core \
+    python3-datetime \
+    python3-io \
+    python3-json \
+    python3-netclient \
+    python3-netserver \
+    python3-shell \
+    python3-stringold \
+    python3-unittest \
+"

Quoted 2 lines

I think some of the rdeps here are only needed to run ptests, they should be moved to RDEPENDS:${PN}-ptest rdeps

Thanks for the fast reply.

The problem is that the python-varlink repository installs the test files as part of the package (so it'll be available in /usr/lib/python3.12/site-packages/varlink/tests/ on the target), and
these files also contains the example code for the repository.

I've discussed exactly that issue with @peter marko on the second version of the patch here:
https://lists.openembedded.org/g/openembedded-devel/message/116172

If you still think that we should split that, and have some solution for
the installed tests directory (either leave it there, without allowing
the user to run-it, or manually remove them from the installation), I can do that. Please let me know.

Quoted 2 lines
Quoted 3 lines
Quoted 3 lines

Review

Quoted 3 lines
(quoted diff) +2 -0
+
+PTEST_PYTEST_DIR = "varlink/tests"

Hi Khem

I am working on a project where I also need the python3-varlink package, so was wondering what the state was regarding being part of meta-openembedded.

A small notice. Omri has moved from working for Prevas to Oticon, so I will try to follow up on his behave.

Have a nice day.

Regards
Claus

#4 lore raw
Quoted 57 lines · Claus Stovgaard
Quoted 48 lines · Omri Sarig via lists.openembedded.org
Quoted 22 lines · Khem Raj
Quoted 9 lines · Omri Sarig via lists.openembedded.org

Add a python recipe to install the python implementation for the varlink
interface.

---

meta-python/recipes-devtools/python/python3-varlink_git.bb new file +1 -0
+RDEPENDS:${PN} += " \

meta-python/recipes-devtools/python/python3-varlink_git.bb line 28

Quoted 10 lines
meta-python/recipes-devtools/python/python3-varlink_git.bb new file +10 -0
+    python3-core \
+    python3-datetime \
+    python3-io \
+    python3-json \
+    python3-netclient \
+    python3-netserver \
+    python3-shell \
+    python3-stringold \
+    python3-unittest \
+"
Quoted 2 lines

I think some of the rdeps here are only needed to run ptests, they should be moved to RDEPENDS:${PN}-ptest rdeps

Thanks for the fast reply.

The problem is that the python-varlink repository installs the test files as part of the package (so it'll be available in /usr/lib/python3.12/site-packages/varlink/tests/ on the target), and
these files also contains the example code for the repository.

I've discussed exactly that issue with @peter marko on the second version of the patch here:
https://lists.openembedded.org/g/openembedded-devel/message/116172

If you still think that we should split that, and have some solution for
the installed tests directory (either leave it there, without allowing
the user to run-it, or manually remove them from the installation), I can do that. Please let me know.

Quoted 2 lines
Quoted 3 lines
Quoted 3 lines

Review

Quoted 3 lines
(quoted diff) +2 -0
+
+PTEST_PYTEST_DIR = "varlink/tests"

Hi Khem

Quoted 3 lines

I am working on a project where I also need the python3-varlink package, so was wondering what the state was regarding being part of meta-openembedded.

It will be good to address the ptest packaging issue.

Quoted 4 lines

A small notice. Omri has moved from working for Prevas to Oticon, so I will try to follow up on his behave.

OK. good to know.

Quoted 4 lines

Have a nice day.

Regards
Claus