public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/proj/guru:master commit in: dev-libs/fastText/files/, dev-libs/fastText/
@ 2024-01-25 10:49 David Roman
  0 siblings, 0 replies; 2+ messages in thread
From: David Roman @ 2024-01-25 10:49 UTC (permalink / raw
  To: gentoo-commits

commit:     1253f6c22e4c3d1fd197f1426e11e3264ba388de
Author:     Takuya Wakazono <pastalian46 <AT> gmail <DOT> com>
AuthorDate: Wed Jan 24 14:03:12 2024 +0000
Commit:     David Roman <davidroman96 <AT> gmail <DOT> com>
CommitDate: Wed Jan 24 14:03:12 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=1253f6c2

dev-libs/fastText: add patches for gcc13 and pep517

Closes: https://bugs.gentoo.org/905908
Signed-off-by: Takuya Wakazono <pastalian46 <AT> gmail.com>

 dev-libs/fastText/fastText-0.9.2.ebuild             | 11 ++++++++---
 dev-libs/fastText/files/fastText-0.9.2-gcc13.patch  | 13 +++++++++++++
 dev-libs/fastText/files/fastText-0.9.2-pep517.patch |  9 +++++++++
 3 files changed, 30 insertions(+), 3 deletions(-)

diff --git a/dev-libs/fastText/fastText-0.9.2.ebuild b/dev-libs/fastText/fastText-0.9.2.ebuild
index ffdf9b3ddf..a55761421e 100644
--- a/dev-libs/fastText/fastText-0.9.2.ebuild
+++ b/dev-libs/fastText/fastText-0.9.2.ebuild
@@ -1,11 +1,12 @@
-# Copyright 2022 Gentoo Authors
+# Copyright 2022-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=8
 
-PYTHON_COMPAT=( python3_{10..11} )
-DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{10..12} )
+DISTUTILS_EXT=1
 DISTUTILS_OPTIONAL=1
+DISTUTILS_USE_PEP517=setuptools
 inherit cmake distutils-r1 edo
 
 DESCRIPTION="Library for fast text representation and classification"
@@ -30,6 +31,10 @@ BDEPEND="
 "
 
 DOCS=( {CODE_OF_CONDUCT,CONTRIBUTING,README}.md python/{README.rst,doc} docs )
+PATCHES=(
+	"${FILESDIR}/${P}-gcc13.patch"
+	"${FILESDIR}/${P}-pep517.patch"
+)
 
 src_prepare() {
 	cmake_src_prepare

diff --git a/dev-libs/fastText/files/fastText-0.9.2-gcc13.patch b/dev-libs/fastText/files/fastText-0.9.2-gcc13.patch
new file mode 100644
index 0000000000..ba00466f34
--- /dev/null
+++ b/dev-libs/fastText/files/fastText-0.9.2-gcc13.patch
@@ -0,0 +1,13 @@
+https://bugs.gentoo.org/905908
+https://github.com/facebookresearch/fastText/commit/6c2204ba66776b700095ff73e3e599a908ffd9c3
+
+--- a/src/args.cc
++++ b/src/args.cc
+@@ -9,6 +9,7 @@
+ #include "args.h"
+ 
+ #include <stdlib.h>
++#include <cstdint>
+ 
+ #include <iostream>
+ #include <stdexcept>

diff --git a/dev-libs/fastText/files/fastText-0.9.2-pep517.patch b/dev-libs/fastText/files/fastText-0.9.2-pep517.patch
new file mode 100644
index 0000000000..aff5ddbfc7
--- /dev/null
+++ b/dev-libs/fastText/files/fastText-0.9.2-pep517.patch
@@ -0,0 +1,9 @@
+Fix SetuptoolsDeprecationWarning: Invalid dash-separated options
+https://github.com/facebookresearch/fastText/pull/1316
+
+--- a/setup.cfg
++++ b/setup.cfg
+@@ -1,2 +1,2 @@
+ [metadata]
+-description-file = README.md
++description_file = README.md


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/proj/guru:master commit in: dev-libs/fastText/files/, dev-libs/fastText/
@ 2024-07-14 17:47 Florian Schmaus
  0 siblings, 0 replies; 2+ messages in thread
From: Florian Schmaus @ 2024-07-14 17:47 UTC (permalink / raw
  To: gentoo-commits

commit:     3296ba136f47d33caa3869af3ea7f80733c990fa
Author:     Takuya Wakazono <pastalian46 <AT> gmail <DOT> com>
AuthorDate: Sun Jul 14 15:23:38 2024 +0000
Commit:     Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Sun Jul 14 15:56:04 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=3296ba13

dev-libs/fastText: enable py3.13

Signed-off-by: Takuya Wakazono <pastalian46 <AT> gmail.com>

 dev-libs/fastText/fastText-0.9.2.ebuild            |  3 ++-
 .../fastText/files/fastText-0.9.2-numpy2.patch     | 30 ++++++++++++++++++++++
 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 a55761421..4e18b26fa 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 000000000..4fe744aca
--- /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 114c245e0..2e0aa32c6 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>


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-07-14 17:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-14 17:47 [gentoo-commits] repo/proj/guru:master commit in: dev-libs/fastText/files/, dev-libs/fastText/ Florian Schmaus
  -- strict thread matches above, loose matches on Subject: below --
2024-01-25 10:49 David Roman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox