mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-10-12 17:51:11 -04:00
dev-python/lupa: new package, add 2.8
Signed-off-by: Florian Albrechtskirchinger <falbrechtskirchinger@gmail.com>
This commit is contained in:
1 parent
d855981cd8
commit
b9dc7177f4
3 files changed
+86
No files matched your search
@@ -0,0 +1 @@
|
||||
DIST lupa-2.8.tar.gz 6156370 BLAKE2B ae0736482d29951480e61c58fcf16f45734ae63851cfb5fe1f0f59a913b9fcf29844ed9b3da69fc158694e71a46a122afb197a75ac0d8b0cb2bc3a0281d4d1a5 SHA512 cd755597635b70fbd37c545011a2203cc0df7a854e1bc1c664e697f1d3c6940f4a1e2df32dbfa0fc409248664ae400303a68763fab1a4b0d1bb20b86feb877c8
|
||||
@@ -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
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
|
||||
<pkgmetadata>
|
||||
<maintainer type="person">
|
||||
<email>falbrechtskirchinger@gmail.com</email>
|
||||
<name>Florian Albrechtskirchinger</name>
|
||||
</maintainer>
|
||||
<upstream>
|
||||
<remote-id type="pypi">lupa</remote-id>
|
||||
<remote-id type="github">scoder/lupa</remote-id>
|
||||
</upstream>
|
||||
</pkgmetadata>
|
||||
Reference in new issue
Block a user