Files
guru/dev-libs/fastText/fastText-0.9.2.ebuild
Anna (cybertailor) Vyalkova bb0aae8ad3 */*: disable py3.10
Python 3.10 target is scheduled for removal in Gentoo:
https://public-inbox.gentoo.org/gentoo-dev/e6ca9f1f4ababb79ab2a3d005c39b483c3ecef6e.camel@gentoo.org/

Sphinx 8.2.0 already dropped support for CPython 3.10 and PyPy 3.10,
leading to multiple CI failures in ::guru.

We can safely remove this target, because GURU is "experimental" and
does not have stable keywords.

Let's not remove "pypy3" right now because
a) There are not many packages using it.
b) So we can see which packages supported PyPy 3.10, and test them with
   PyPy 3.11.

Closes: https://github.com/gentoo/guru/pull/291
Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo@sysrq.in>
2025-02-21 17:51:14 +05:00

79 lines
1.6 KiB
Bash

# Copyright 2022-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
PYTHON_COMPAT=( python3_{11..13} )
DISTUTILS_EXT=1
DISTUTILS_OPTIONAL=1
DISTUTILS_USE_PEP517=setuptools
inherit cmake distutils-r1 edo
DESCRIPTION="Library for fast text representation and classification"
HOMEPAGE="https://fasttext.cc https://github.com/facebookresearch/fastText"
SRC_URI="https://github.com/facebookresearch/${PN}/archive/refs/tags/v${PV}.tar.gz -> ${P}.gh.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64"
IUSE="python"
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
RDEPEND="
python? (
${PYTHON_DEPS}
dev-python/pybind11[${PYTHON_USEDEP}]
dev-python/numpy[${PYTHON_USEDEP}]
)
"
BDEPEND="
python? ( ${DISTUTILS_DEPS} )
"
DOCS=( {CODE_OF_CONDUCT,CONTRIBUTING,README}.md python/{README.rst,doc} docs )
PATCHES=(
"${FILESDIR}/${P}-gcc13.patch"
"${FILESDIR}/${P}-numpy2.patch"
"${FILESDIR}/${P}-pep517.patch"
)
src_prepare() {
cmake_src_prepare
use python && distutils-r1_src_prepare
sed \
-e "/CMAKE_CXX_FLAGS/d" \
-e "s/\(DESTINATION\) lib/\1 $(get_libdir)/g" \
-i CMakeLists.txt || die
sed "/extra_compile_args=/,+1d" -i setup.py || die
}
src_configure() {
local mycmakeargs=(
-DPROJECT_VERSION=${PV}
)
cmake_src_configure
use python && distutils-r1_src_configure
}
src_compile() {
cmake_src_compile
use python && distutils-r1_src_compile
}
src_test() {
use python && distutils-r1_src_test
}
python_test() {
edo ${EPYTHON} runtests.py -u
}
src_install() {
cmake_src_install
use python && distutils-r1_src_install
find "${ED}" -name '*.a' -delete || die
}