dev-python/pyrime: fix build with pypy

Closes: https://bugs.gentoo.org/946510
Signed-off-by: Takuya Wakazono <pastalian46@gmail.com>
This commit is contained in:
Takuya Wakazono
2025-01-19 00:35:09 +09:00
parent 322370e7c0
commit 4360ac2b1c
2 changed files with 23 additions and 6 deletions

View File

@@ -0,0 +1,11 @@
https://bugs.gentoo.org/946510
https://github.com/Freed-Wu/pyrime/pull/3
Using Cython requires both 'cython' and 'c' to be specified in the
project().
--- a/meson.build
+++ b/meson.build
@@ -1,3 +1,3 @@
-project('pyrime', 'cython', version: '0.0.7')
+project('pyrime', 'cython', 'c', version: '0.0.7')
subdir('src/pyrime')

View File

@@ -1,8 +1,9 @@
# Copyright 1999-2022 Gentoo Authors
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
DISTUTILS_EXT=1
DISTUTILS_USE_PEP517=meson-python
PYTHON_COMPAT=( python3_{10..13} pypy3 )
inherit distutils-r1 pypi
@@ -21,13 +22,8 @@ IUSE="+prompt-toolkit +ptpython"
DEPEND="
app-i18n/librime
dev-python/cython[${PYTHON_USEDEP}]
dev-python/autopxd[${PYTHON_USEDEP}]
"
EPYTEST_XDIST=1
distutils_enable_tests pytest
RDEPEND="
$DEPEND
prompt-toolkit? (
@@ -39,6 +35,16 @@ RDEPEND="
dev-python/platformdirs[${PYTHON_USEDEP}]
)
"
BDEPEND="
dev-python/cython[${PYTHON_USEDEP}]
"
PATCHES=(
"${FILESDIR}/${P}-fix-meson-project.patch"
)
EPYTEST_XDIST=1
distutils_enable_tests pytest
python_test() {
epytest