diff options
author | 2024-07-15 00:23:38 +0900 | |
---|---|---|
committer | 2024-07-15 00:56:04 +0900 | |
commit | 3296ba136f47d33caa3869af3ea7f80733c990fa (patch) | |
tree | 720626132eb1ace3c6672c2f33c8fb5465ae9da4 | |
parent | dev-util/deblob: add 0.8 (diff) | |
download | guru-3296ba136f47d33caa3869af3ea7f80733c990fa.tar.gz guru-3296ba136f47d33caa3869af3ea7f80733c990fa.tar.bz2 guru-3296ba136f47d33caa3869af3ea7f80733c990fa.zip |
dev-libs/fastText: enable py3.13
Signed-off-by: Takuya Wakazono <pastalian46@gmail.com>
-rw-r--r-- | dev-libs/fastText/fastText-0.9.2.ebuild | 3 | ||||
-rw-r--r-- | dev-libs/fastText/files/fastText-0.9.2-numpy2.patch | 30 | ||||
-rw-r--r-- | dev-libs/fastText/metadata.xml | 5 |
3 files changed, 36 insertions, 2 deletions
diff --git a/dev-libs/fastText/fastText-0.9.2.ebuild b/dev-libs/fastText/fastText-0.9.2.ebuild index a55761421e..4e18b26faa 100644 --- a/dev-libs/fastText/fastText-0.9.2.ebuild +++ b/dev-libs/fastText/fastText-0.9.2.ebuild @@ -3,7 +3,7 @@ EAPI=8 -PYTHON_COMPAT=( python3_{10..12} ) +PYTHON_COMPAT=( python3_{10..13} ) DISTUTILS_EXT=1 DISTUTILS_OPTIONAL=1 DISTUTILS_USE_PEP517=setuptools @@ -33,6 +33,7 @@ BDEPEND=" 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" ) diff --git a/dev-libs/fastText/files/fastText-0.9.2-numpy2.patch b/dev-libs/fastText/files/fastText-0.9.2-numpy2.patch new file mode 100644 index 0000000000..4fe744aca2 --- /dev/null +++ b/dev-libs/fastText/files/fastText-0.9.2-numpy2.patch @@ -0,0 +1,30 @@ +https://numpy.org/devdocs/numpy_2_0_migration_guide.html#adapting-to-changes-in-the-copy-keyword +--- a/python/fasttext_module/fasttext/FastText.py ++++ b/python/fasttext_module/fasttext/FastText.py +@@ -43,7 +43,7 @@ class _Meter(object): + else: + y_scores, y_true = ([], ()) + +- return np.array(y_scores, copy=False), np.array(y_true, copy=False) ++ return np.asarray(y_scores), np.asarray(y_true) + + def precision_recall_curve(self, label=None): + """Return precision/recall curve""" +@@ -58,7 +58,7 @@ class _Meter(object): + else: + precision, recall = ([], ()) + +- return np.array(precision, copy=False), np.array(recall, copy=False) ++ return np.asarray(precision), np.asarray(recall) + + def precision_at_recall(self, recall, label=None): + """Return precision for a given recall""" +@@ -229,7 +229,7 @@ class _FastText(object): + else: + probs, labels = ([], ()) + +- return labels, np.array(probs, copy=False) ++ return labels, np.asarray(probs) + + def get_input_matrix(self): + """ diff --git a/dev-libs/fastText/metadata.xml b/dev-libs/fastText/metadata.xml index 114c245e06..2e0aa32c6a 100644 --- a/dev-libs/fastText/metadata.xml +++ b/dev-libs/fastText/metadata.xml @@ -1,7 +1,10 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> - <!-- maintainer-needed --> + <maintainer type="person"> + <email>pastalian46@gmail.com</email> + <name>Takuya Wakazono</name> + </maintainer> <upstream> <remote-id type="github">facebookresearch/fastText</remote-id> <remote-id type="pypi">fasttext</remote-id> |