aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpsykose <alice@ayaya.dev>2022-08-02 12:23:33 +0000
committerpsykose <alice@ayaya.dev>2022-08-02 14:23:33 +0200
commit9178da6515d39a2b1f15db7f1515b0f45b5f752a (patch)
tree5f0c040b1614b4f8bd744691e937f2d87070436b
parent555b3c97125c61b8b62013b51cdb7dc9049df8e8 (diff)
main/spice: fix python module detection
-rw-r--r--main/spice/APKBUILD2
-rw-r--r--main/spice/python-module-check.patch37
2 files changed, 39 insertions, 0 deletions
diff --git a/main/spice/APKBUILD b/main/spice/APKBUILD
index e4fe7fc7b1e..353a604b79d 100644
--- a/main/spice/APKBUILD
+++ b/main/spice/APKBUILD
@@ -29,6 +29,7 @@ subpackages="$pkgname-dev $pkgname-server"
source="https://www.spice-space.org/download/releases/spice-server/spice-$pkgver.tar.bz2
failing-tests.patch
fix-build.patch
+ python-module-check.patch
"
# secfixes:
@@ -75,4 +76,5 @@ sha512sums="
0a776d191c395ce1f7ebbbac47956a00a2765327d3127aeca6e232bd56fd4ccd28750ae1599eb6eb2909ac909cda517d5511faa631166db16b8b75bd4e7b86d9 spice-0.15.0.tar.bz2
96f3f4e8d7d0582bf6ac23649cf90e4f23a8670bf251308fdc4736bcc243c977b50731b16047256a981259e3928e48e2b410624530748bcd285b3187f35fed88 failing-tests.patch
b61ae910c08e26c7788682f6b5df8190c9db7802858f9ca05093bb1bafd226adc2f16382721e4f63cbc09b7196f9ac967d0175c1e16253028e94fa27372ab8e6 fix-build.patch
+5bddddcb3e37b79354ba4c03157c6a1cb8d9952a700128fea83f3d32a9ac86ba3de96aa9c68f8c80ff2ca5658318630c889b9bbc87ba2e2889c5eb94b5fec16e python-module-check.patch
"
diff --git a/main/spice/python-module-check.patch b/main/spice/python-module-check.patch
new file mode 100644
index 00000000000..a41ecf96b8b
--- /dev/null
+++ b/main/spice/python-module-check.patch
@@ -0,0 +1,37 @@
+Patch-Source: https://gitlab.freedesktop.org/spice/spice-common/-/commit/a7b5474bf808934cf0ee1107a58d5f4d97b9afbf
+From a7b5474bf808934cf0ee1107a58d5f4d97b9afbf Mon Sep 17 00:00:00 2001
+From: Frediano Ziglio <freddy77@gmail.com>
+Date: Thu, 28 Oct 2021 16:45:34 +0100
+Subject: [PATCH] build: Correctly check for Python modules
+
+Currently using Meson the command "python -m <MODULE_NAME>" is
+run. However this command instead of trying to import the module
+tried to execute it as a script failing for the updated pyparsing
+with:
+
+ /usr/bin/python3: No module named pyparsing.__main__; 'pyparsing' is a package and cannot be directly executed
+
+So instead use "python -c 'import <MODULE_NAME>".
+Autoconf is already using that command (see m4/ax_python_module.m4).
+
+Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
+---
+ meson.build | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index aff6243..eeccecd 100644
+--- a/subprojects/spice-common/meson.build
++++ b/subprojects/spice-common/meson.build
+@@ -132,7 +132,7 @@ if spice_common_generate_client_code or spice_common_generate_server_code
+ if get_option('python-checks')
+ foreach module : ['six', 'pyparsing']
+ message('Checking for python module @0@'.format(module))
+- cmd = run_command(python, '-m', module)
++ cmd = run_command(python, '-c', 'import @0@'.format(module))
+ if cmd.returncode() != 0
+ error('Python module @0@ not found'.format(module))
+ endif
+--
+GitLab
+