summaryrefslogtreecommitdiff
path: root/dev-libs/fastText/fastText-0.9.2-r1.ebuild
diff options
context:
space:
mode:
authorMarcin Deranek <marcin.deranek@slonko.net>2024-06-03 22:46:17 +0200
committerMarcin Deranek <marcin.deranek@slonko.net>2024-06-03 23:20:03 +0200
commit14cb560ed4140171641722af16491ef2e19053ae (patch)
tree631cdcdb4b3cb6213bfacd0e8f1e625c92ecfe2a /dev-libs/fastText/fastText-0.9.2-r1.ebuild
parent06ec6d8ff4726dedeeb65f42ff6e0b597a6e7f96 (diff)
downloadportage-14cb560ed4140171641722af16491ef2e19053ae.tar.gz
portage-14cb560ed4140171641722af16491ef2e19053ae.tar.bz2
portage-14cb560ed4140171641722af16491ef2e19053ae.zip
dev-libs/fastText Add python 3.12 support
Diffstat (limited to 'dev-libs/fastText/fastText-0.9.2-r1.ebuild')
-rw-r--r--dev-libs/fastText/fastText-0.9.2-r1.ebuild5
1 files changed, 4 insertions, 1 deletions
diff --git a/dev-libs/fastText/fastText-0.9.2-r1.ebuild b/dev-libs/fastText/fastText-0.9.2-r1.ebuild
index 4198ad6..969ebd6 100644
--- a/dev-libs/fastText/fastText-0.9.2-r1.ebuild
+++ b/dev-libs/fastText/fastText-0.9.2-r1.ebuild
@@ -4,8 +4,9 @@
EAPI=8
DISTUTILS_USE_PEP517=setuptools
+DISTUTILS_EXT=1
DISTUTILS_OPTIONAL=1
-PYTHON_COMPAT=( python3_{8..11} )
+PYTHON_COMPAT=( python3_{10..12} )
inherit cmake distutils-r1
@@ -38,6 +39,8 @@ src_prepare() {
CMakeLists.txt || die "sed failed for CMakeLists.txt"
sed -i "/extra_compile_args=/,+1d" setup.py \
|| die "sed failed for setup.py"
+ sed -r -e 's|np.array\(([^,]*),\s*copy=False\)|np.asarray(\1)|g' -i python/fasttext_module/fasttext/FastText.py \
+ || die "sed failed for FastText.py"
}
python_prepare_all() {