From b9dc7177f49378ea04a438d5b16b6a0d0e61e7d3 Mon Sep 17 00:00:00 2001 From: Florian Albrechtskirchinger Date: Tue, 23 Jun 2026 13:54:02 +0200 Subject: [PATCH] dev-python/lupa: new package, add 2.8 Signed-off-by: Florian Albrechtskirchinger --- dev-python/lupa/Manifest | 1 + dev-python/lupa/lupa-2.8.ebuild | 73 +++++++++++++++++++++++++++++++++ dev-python/lupa/metadata.xml | 12 ++++++ 3 files changed, 86 insertions(+) create mode 100644 dev-python/lupa/Manifest create mode 100644 dev-python/lupa/lupa-2.8.ebuild create mode 100644 dev-python/lupa/metadata.xml diff --git a/dev-python/lupa/Manifest b/dev-python/lupa/Manifest new file mode 100644 index 0000000000..f5a7b5ddeb --- /dev/null +++ b/dev-python/lupa/Manifest @@ -0,0 +1 @@ +DIST lupa-2.8.tar.gz 6156370 BLAKE2B ae0736482d29951480e61c58fcf16f45734ae63851cfb5fe1f0f59a913b9fcf29844ed9b3da69fc158694e71a46a122afb197a75ac0d8b0cb2bc3a0281d4d1a5 SHA512 cd755597635b70fbd37c545011a2203cc0df7a854e1bc1c664e697f1d3c6940f4a1e2df32dbfa0fc409248664ae400303a68763fab1a4b0d1bb20b86feb877c8 diff --git a/dev-python/lupa/lupa-2.8.ebuild b/dev-python/lupa/lupa-2.8.ebuild new file mode 100644 index 0000000000..4a6d0050f3 --- /dev/null +++ b/dev-python/lupa/lupa-2.8.ebuild @@ -0,0 +1,73 @@ +# Copyright 2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_EXT=1 +DISTUTILS_USE_PEP517=setuptools +LUA_COMPAT=( lua5-{1..4} luajit ) +PYTHON_COMPAT=( python3_{12..15} ) + +inherit distutils-r1 lua pypi + +DESCRIPTION="Python wrapper around Lua and LuaJIT" +HOMEPAGE=" + https://github.com/scoder/lupa + https://pypi.org/project/lupa/ +" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~arm64" +REQUIRED_USE="${LUA_REQUIRED_USE} ${PYTHON_REQUIRED_USE}" + +DEPEND="${LUA_DEPS}" +RDEPEND="${DEPEND}" +BDEPEND=" + >=dev-python/cython-3.2.4[${PYTHON_USEDEP}] + virtual/pkgconfig +" + +src_prepare() { + distutils-r1_src_prepare + + mv lupa/tests . || die + sed -i "s/lupa.tests/tests/g" tests/test.py || die +} + +python_configure_all() { + DISTUTILS_ARGS=( + --no-bundle + --with-cython + ) + + local -a config_items + _build_config_items() { + local incdir=$(lua_get_include_dir "${ELUA}") + local libpath=$(lua_get_shared_lib "${ELUA}") + local modname="${ELUA/./}" + + config_items+=( + "dict(extra_objects=['${libpath}'], include_dirs=['${incdir}'], libversion='${modname}')" + ) + } + lua_foreach_impl _build_config_items + + local IFS="," + local configs="[${config_items[*]}]" + + sed -i "s|^configs = get_lua_build_from_arguments()|configs = ${configs}|" setup.py || die +} + +EPYTEST_PLUGINS=() +distutils_enable_tests pytest + +python_test() { + EPYTEST_DESELECT=( + # not a test case + tests/test.py::TestOverflowMixin + ) + + rm -rf lupa || die + epytest tests/test.py +} diff --git a/dev-python/lupa/metadata.xml b/dev-python/lupa/metadata.xml new file mode 100644 index 0000000000..cdd06fff64 --- /dev/null +++ b/dev-python/lupa/metadata.xml @@ -0,0 +1,12 @@ + + + + + falbrechtskirchinger@gmail.com + Florian Albrechtskirchinger + + + lupa + scoder/lupa + +