* [gentoo-commits] repo/gentoo:master commit in: app-text/paperwork-backend/files/, app-text/paperwork-backend/
@ 2024-02-04 23:05 Bernard Cafarelli
0 siblings, 0 replies; 4+ messages in thread
From: Bernard Cafarelli @ 2024-02-04 23:05 UTC (permalink / raw
To: gentoo-commits
commit: d7930585b2eaf14c6e93263898b0f311ce12969a
Author: Bernard Cafarelli <voyageur <AT> gentoo <DOT> org>
AuthorDate: Sun Feb 4 23:05:08 2024 +0000
Commit: Bernard Cafarelli <voyageur <AT> gentoo <DOT> org>
CommitDate: Sun Feb 4 23:05:48 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d7930585
app-text/paperwork-backend: fix PDF file segfault
Backport from upstream workaround
Closes: https://bugs.gentoo.org/765526
Signed-off-by: Bernard Cafarelli <voyageur <AT> gentoo.org>
.../paperwork-backend-2.2.1-cairo_workaround.patch | 52 ++++++++++++++++++
.../paperwork-backend-2.2.1-r1.ebuild | 63 ++++++++++++++++++++++
2 files changed, 115 insertions(+)
diff --git a/app-text/paperwork-backend/files/paperwork-backend-2.2.1-cairo_workaround.patch b/app-text/paperwork-backend/files/paperwork-backend-2.2.1-cairo_workaround.patch
new file mode 100644
index 000000000000..01eb2a6154b0
--- /dev/null
+++ b/app-text/paperwork-backend/files/paperwork-backend-2.2.1-cairo_workaround.patch
@@ -0,0 +1,52 @@
+From c9430b844fbcedc9119e3d464f5f0c85feb7b197 Mon Sep 17 00:00:00 2001
+From: Jerome Flesch <jflesch@openpaper.work>
+Date: Sun, 4 Feb 2024 20:33:27 +0100
+Subject: [PATCH] Backend/docexport PDF: Workaround Cairo bug that causes
+ occasional crashes when exporting to generated PDF.
+
+Closes #942
+---
+ .../src/paperwork_backend/docexport/pdf.py | 13 +++++++++++++
+ 1 file changed, 13 insertions(+)
+
+diff --git a/paperwork-backend/src/paperwork_backend/docexport/pdf.py b/paperwork-backend/src/paperwork_backend/docexport/pdf.py
+index 160e60710..befded73c 100644
+--- a/paperwork-backend/src/paperwork_backend/docexport/pdf.py
++++ b/paperwork-backend/src/paperwork_backend/docexport/pdf.py
+@@ -115,6 +115,8 @@ class PdfCreator(object):
+ )
+ self.pdf_context = cairo.Context(self.pdf_surface)
+
++ self.gc_protection = [] # WORKAROUND(Jflesch): Cairo crash
++
+ def set_page_size(self, img_size):
+ # portrait or landscape
+ if (img_size[0] < img_size[1]):
+@@ -187,6 +189,16 @@ class PdfCreator(object):
+ "pillow_to_surface", img,
+ intermediate="jpeg", quality=int(self.quality * 100)
+ )
++ # WORKAROUND(Jflesch):
++ # If Cairo supports JPEG embedding, we use
++ # cairo.ImageSurface.set_mime_data() instead of the usual Cairo
++ # surface functions to draw the image. It seems this function does
++ # not increment the ref counter of the surface object
++ # --> the Python GC tends to collect it while Cairo is still going
++ # to use it to generate the PDF.
++ # --> we have to keep a reference on it ourselves, until the page has
++ # been generated.
++ self.gc_protection.append(img_surface)
+
+ self.pdf_context.save()
+ try:
+@@ -199,6 +211,7 @@ class PdfCreator(object):
+
+ def next_page(self):
+ self.pdf_context.show_page()
++ self.gc_protection = [] # WORKAROUND(Jflesch): Cairo crash
+
+ def finish(self):
+ self.pdf_surface.flush()
+--
+GitLab
+
diff --git a/app-text/paperwork-backend/paperwork-backend-2.2.1-r1.ebuild b/app-text/paperwork-backend/paperwork-backend-2.2.1-r1.ebuild
new file mode 100644
index 000000000000..bb7a9c75061b
--- /dev/null
+++ b/app-text/paperwork-backend/paperwork-backend-2.2.1-r1.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{9..12} )
+
+inherit distutils-r1
+
+DESCRIPTION="Backend part of Paperwork (Python API, no UI)"
+HOMEPAGE="https://gitlab.gnome.org/World/OpenPaperwork"
+# Update from release hash at:
+# https://gitlab.gnome.org/World/OpenPaperwork/paperwork/-/tags
+REL_HASH="0bea4054"
+SRC_URI="https://gitlab.gnome.org/World/OpenPaperwork/paperwork/-/archive/${PV}/paperwork-${PV}.tar.bz2
+ https://download.openpaper.work/data/paperwork/master_${REL_HASH}/data.tar.gz -> paperwork-data-${PV}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="
+ app-text/openpaperwork-core[${PYTHON_USEDEP}]
+ app-text/openpaperwork-gtk[${PYTHON_USEDEP}]
+ app-text/poppler[introspection]
+ dev-python/distro[${PYTHON_USEDEP}]
+ dev-python/pillow[${PYTHON_USEDEP}]
+ dev-python/psutil[${PYTHON_USEDEP}]
+ dev-python/pycairo[${PYTHON_USEDEP}]
+ dev-python/pycountry[${PYTHON_USEDEP}]
+ dev-python/pygobject:3[${PYTHON_USEDEP}]
+ dev-python/termcolor[${PYTHON_USEDEP}]
+ dev-python/whoosh[${PYTHON_USEDEP}]
+ sci-libs/scikit-learn[${PYTHON_USEDEP}]
+"
+BDEPEND="
+ ${RDEPEND}
+ dev-python/setuptools-scm[${PYTHON_USEDEP}]
+ sys-apps/which
+ sys-devel/gettext
+ test? (
+ dev-python/libpillowfight[${PYTHON_USEDEP}]
+ media-libs/libinsane
+ )
+"
+S=${WORKDIR}/paperwork-${PV}/${PN}
+
+distutils_enable_tests unittest
+
+export SETUPTOOLS_SCM_PRETEND_VERSION=${PV}
+
+src_prepare() {
+ default
+ cd "${WORKDIR}"/paperwork-${PV} || die
+ eapply "${FILESDIR}"/${P}-cairo_workaround.patch
+}
+
+python_compile() {
+ emake l10n_compile
+
+ distutils-r1_python_compile
+}
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-text/paperwork-backend/files/, app-text/paperwork-backend/
@ 2024-05-06 23:05 Bernard Cafarelli
0 siblings, 0 replies; 4+ messages in thread
From: Bernard Cafarelli @ 2024-05-06 23:05 UTC (permalink / raw
To: gentoo-commits
commit: 72ad69be765f14a5ffc3f45e8314012f260024d3
Author: Bernard Cafarelli <voyageur <AT> gentoo <DOT> org>
AuthorDate: Mon May 6 23:01:53 2024 +0000
Commit: Bernard Cafarelli <voyageur <AT> gentoo <DOT> org>
CommitDate: Mon May 6 23:05:10 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=72ad69be
app-text/paperwork-backend: add 2.2.2
Closes: https://bugs.gentoo.org/931299
Signed-off-by: Bernard Cafarelli <voyageur <AT> gentoo.org>
app-text/paperwork-backend/Manifest | 2 +
.../files/paperwork-backend-2.2.2-scipy.patch | 55 +++++++++++++++++++
.../paperwork-backend-2.2.2.ebuild | 63 ++++++++++++++++++++++
3 files changed, 120 insertions(+)
diff --git a/app-text/paperwork-backend/Manifest b/app-text/paperwork-backend/Manifest
index 5d17894750df..3bb713c3cb5a 100644
--- a/app-text/paperwork-backend/Manifest
+++ b/app-text/paperwork-backend/Manifest
@@ -1,2 +1,4 @@
DIST paperwork-2.2.1.tar.bz2 2529505 BLAKE2B e5545d3fbb5e41d0ddd21a0358fae496d127b30a3f72e1438eef679c520a3152e4db006d9dc42023431907281452931e90aea187c4928309bde7add2d54b5844 SHA512 f96ddf3efe3b5021e612600fa2e3a9c83db7ec78b9637e434facefcc422700be1b67b74231b4738a7762905ac5267f412839ff9d43cb9dcf7f95a5f3d6f7091f
+DIST paperwork-2.2.2.tar.bz2 2531134 BLAKE2B 760d5fdc949ed44993c9845232e3f92b26b8dcb84ef82b08be7dbb0b262461feaf06f930f3fce0b94fdd8412a8264969bac117e3ea7aef70e1b47436a9dba3c0 SHA512 e0d3c24a0d611ffea231e129461d2925dc8318aaade185e83361bca8d1757e4601510db6122dc412863e617a387eb1c6008d0974c2b37be7ac4e4c3e68bc450b
DIST paperwork-data-2.2.1.tar.gz 5210355 BLAKE2B 48ee8f9828f7aed9b41c998c2cdc43a2b98c2a2482e388500b8d04867a450bbf3264ef5a87d7f215f1389943e4cbab452d3a7a6235d63cfdb27127ab56ad9c2f SHA512 cf663368f733f45dde8242c3ad9ba405361628bddb7e8aed9dffeb5bb86c1abac7a3485cb7e2042d65006f8f336390fa81ea182dad62f4259b79805ac7a0416b
+DIST paperwork-data-2.2.2.tar.gz 5206588 BLAKE2B 7dd15d31b0b3b59900556d78b271f36cc1cab533d273948a7d0eb364028ec0d1c26b2743a10565e2fc1d65786a11a1589c776c2ec1df6030efe8a79b2fba53a0 SHA512 aaf8e4174504eed7b33b2a0d3ad1b0af489d70bd9a425cf9363011fc6e24dd42a6822a5d078898279e78bbe15b4e36075c5a57a5ec74eabb3c2af7b9c3cc3e76
diff --git a/app-text/paperwork-backend/files/paperwork-backend-2.2.2-scipy.patch b/app-text/paperwork-backend/files/paperwork-backend-2.2.2-scipy.patch
new file mode 100644
index 000000000000..9add28626a23
--- /dev/null
+++ b/app-text/paperwork-backend/files/paperwork-backend-2.2.2-scipy.patch
@@ -0,0 +1,55 @@
+From abcebfe9714644d4e259e53b10e0e9417b5b864f Mon Sep 17 00:00:00 2001
+From: Jerome Flesch <jflesch@openpaper.work>
+Date: Sun, 21 Apr 2024 13:31:03 +0200
+Subject: [PATCH] backend/guesswork/labels/sklearn: fix use of
+ scipy.sparse.hstack() + numpy.zeros()
+
+Closes #1111
+---
+ .../paperwork_backend/guesswork/label/sklearn/__init__.py | 5 +++--
+ paperwork-backend/src/paperwork_backend/model/fake.py | 6 ++++++
+ 2 files changed, 9 insertions(+), 2 deletions(-)
+
+diff --git a/paperwork-backend/src/paperwork_backend/guesswork/label/sklearn/__init__.py b/paperwork-backend/src/paperwork_backend/guesswork/label/sklearn/__init__.py
+index b2af4350..8633211f 100644
+--- a/paperwork-backend/src/paperwork_backend/guesswork/label/sklearn/__init__.py
++++ b/paperwork-backend/src/paperwork_backend/guesswork/label/sklearn/__init__.py
+@@ -191,7 +191,8 @@ class UpdatableVectorizer(object):
+ )
+ if required_padding > 0:
+ doc_vector = numpy.hstack([
+- doc_vector, numpy.zeros((required_padding,))
++ doc_vector,
++ numpy.zeros((required_padding,))
+ ])
+ if sum_features is None:
+ sum_features = doc_vector
+@@ -339,7 +340,7 @@ class Corpus(object):
+ if required_padding > 0:
+ doc_vector = scipy.sparse.hstack([
+ scipy.sparse.csr_matrix(doc_vector),
+- numpy.zeros((required_padding,))
++ numpy.zeros((1, required_padding))
+ ])
+ else:
+ doc_vector = scipy.sparse.csr_matrix(doc_vector)
+diff --git a/paperwork-backend/src/paperwork_backend/model/fake.py b/paperwork-backend/src/paperwork_backend/model/fake.py
+index 29beae97..f06fe18e 100644
+--- a/paperwork-backend/src/paperwork_backend/model/fake.py
++++ b/paperwork-backend/src/paperwork_backend/model/fake.py
+@@ -125,6 +125,12 @@ class Plugin(openpaperwork_core.PluginBase):
+ if doc['url'] == doc_url:
+ out.update(doc['labels'])
+
++ def doc_has_labels_by_url(self, doc_url):
++ for doc in self.docs:
++ if doc['url'] == doc_url:
++ return True if len(doc["labels"]) > 0 else None
++ return None
++
+ def doc_add_label_by_url(self, doc_url, label, color=None):
+ if color is None:
+ all_labels = set()
+--
+GitLab
+
diff --git a/app-text/paperwork-backend/paperwork-backend-2.2.2.ebuild b/app-text/paperwork-backend/paperwork-backend-2.2.2.ebuild
new file mode 100644
index 000000000000..738513e7b1a6
--- /dev/null
+++ b/app-text/paperwork-backend/paperwork-backend-2.2.2.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{10..12} )
+
+inherit distutils-r1
+
+DESCRIPTION="Backend part of Paperwork (Python API, no UI)"
+HOMEPAGE="https://gitlab.gnome.org/World/OpenPaperwork"
+# Update from release hash at:
+# https://gitlab.gnome.org/World/OpenPaperwork/paperwork/-/tags
+REL_HASH="3f51346f"
+SRC_URI="https://gitlab.gnome.org/World/OpenPaperwork/paperwork/-/archive/${PV}/paperwork-${PV}.tar.bz2
+ https://download.openpaper.work/data/paperwork/master_${REL_HASH}/data.tar.gz -> paperwork-data-${PV}.tar.gz"
+S=${WORKDIR}/paperwork-${PV}/${PN}
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="
+ app-text/openpaperwork-core[${PYTHON_USEDEP}]
+ app-text/openpaperwork-gtk[${PYTHON_USEDEP}]
+ app-text/poppler[introspection]
+ dev-python/distro[${PYTHON_USEDEP}]
+ dev-python/pillow[${PYTHON_USEDEP}]
+ dev-python/psutil[${PYTHON_USEDEP}]
+ dev-python/pycairo[${PYTHON_USEDEP}]
+ dev-python/pycountry[${PYTHON_USEDEP}]
+ dev-python/pygobject:3[${PYTHON_USEDEP}]
+ dev-python/scikit-learn[${PYTHON_USEDEP}]
+ dev-python/termcolor[${PYTHON_USEDEP}]
+ dev-python/whoosh[${PYTHON_USEDEP}]
+"
+BDEPEND="
+ ${RDEPEND}
+ dev-python/setuptools-scm[${PYTHON_USEDEP}]
+ sys-apps/which
+ sys-devel/gettext
+ test? (
+ dev-python/libpillowfight[${PYTHON_USEDEP}]
+ media-libs/libinsane
+ )
+"
+
+distutils_enable_tests unittest
+
+export SETUPTOOLS_SCM_PRETEND_VERSION=${PV}
+
+src_prepare() {
+ default
+ cd "${WORKDIR}"/paperwork-${PV} || die
+ eapply "${FILESDIR}"/${P}-scipy.patch
+}
+
+python_compile() {
+ emake l10n_compile
+
+ distutils-r1_python_compile
+}
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-text/paperwork-backend/files/, app-text/paperwork-backend/
@ 2024-06-14 10:47 Bernard Cafarelli
0 siblings, 0 replies; 4+ messages in thread
From: Bernard Cafarelli @ 2024-06-14 10:47 UTC (permalink / raw
To: gentoo-commits
commit: d0647ae12a0292c2c2ce982415300acf4b95f124
Author: Bernard Cafarelli <voyageur <AT> gentoo <DOT> org>
AuthorDate: Fri Jun 14 09:28:45 2024 +0000
Commit: Bernard Cafarelli <voyageur <AT> gentoo <DOT> org>
CommitDate: Fri Jun 14 10:40:21 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d0647ae1
app-text/paperwork-backend: add 2.2.3, drop 2.2.1-r1
Signed-off-by: Bernard Cafarelli <voyageur <AT> gentoo.org>
app-text/paperwork-backend/Manifest | 4 +-
.../paperwork-backend-2.2.1-cairo_workaround.patch | 52 ----------------------
....1-r1.ebuild => paperwork-backend-2.2.3.ebuild} | 10 +----
3 files changed, 4 insertions(+), 62 deletions(-)
diff --git a/app-text/paperwork-backend/Manifest b/app-text/paperwork-backend/Manifest
index 3bb713c3cb5a..9f6c193ed7f0 100644
--- a/app-text/paperwork-backend/Manifest
+++ b/app-text/paperwork-backend/Manifest
@@ -1,4 +1,4 @@
-DIST paperwork-2.2.1.tar.bz2 2529505 BLAKE2B e5545d3fbb5e41d0ddd21a0358fae496d127b30a3f72e1438eef679c520a3152e4db006d9dc42023431907281452931e90aea187c4928309bde7add2d54b5844 SHA512 f96ddf3efe3b5021e612600fa2e3a9c83db7ec78b9637e434facefcc422700be1b67b74231b4738a7762905ac5267f412839ff9d43cb9dcf7f95a5f3d6f7091f
DIST paperwork-2.2.2.tar.bz2 2531134 BLAKE2B 760d5fdc949ed44993c9845232e3f92b26b8dcb84ef82b08be7dbb0b262461feaf06f930f3fce0b94fdd8412a8264969bac117e3ea7aef70e1b47436a9dba3c0 SHA512 e0d3c24a0d611ffea231e129461d2925dc8318aaade185e83361bca8d1757e4601510db6122dc412863e617a387eb1c6008d0974c2b37be7ac4e4c3e68bc450b
-DIST paperwork-data-2.2.1.tar.gz 5210355 BLAKE2B 48ee8f9828f7aed9b41c998c2cdc43a2b98c2a2482e388500b8d04867a450bbf3264ef5a87d7f215f1389943e4cbab452d3a7a6235d63cfdb27127ab56ad9c2f SHA512 cf663368f733f45dde8242c3ad9ba405361628bddb7e8aed9dffeb5bb86c1abac7a3485cb7e2042d65006f8f336390fa81ea182dad62f4259b79805ac7a0416b
+DIST paperwork-2.2.3.tar.bz2 2531208 BLAKE2B 6259a9b7a916ad71fc0f0747ce0c17e874dbff962c3d8b46c4c25c2a119de6d27f0ce7ce262dfbf7290fa436726fc538d9bead2664d7f158d51634eece768620 SHA512 68bad3ccc9ed2fdea2b1336945ca4f11de5b0a2249d5f043dc34d620ae5bf6627c0255d4776a5c19e9d266972403023f0b63eb3bf694d7a33051b53239c017bf
DIST paperwork-data-2.2.2.tar.gz 5206588 BLAKE2B 7dd15d31b0b3b59900556d78b271f36cc1cab533d273948a7d0eb364028ec0d1c26b2743a10565e2fc1d65786a11a1589c776c2ec1df6030efe8a79b2fba53a0 SHA512 aaf8e4174504eed7b33b2a0d3ad1b0af489d70bd9a425cf9363011fc6e24dd42a6822a5d078898279e78bbe15b4e36075c5a57a5ec74eabb3c2af7b9c3cc3e76
+DIST paperwork-data-2.2.3.tar.gz 5206588 BLAKE2B 7dd15d31b0b3b59900556d78b271f36cc1cab533d273948a7d0eb364028ec0d1c26b2743a10565e2fc1d65786a11a1589c776c2ec1df6030efe8a79b2fba53a0 SHA512 aaf8e4174504eed7b33b2a0d3ad1b0af489d70bd9a425cf9363011fc6e24dd42a6822a5d078898279e78bbe15b4e36075c5a57a5ec74eabb3c2af7b9c3cc3e76
diff --git a/app-text/paperwork-backend/files/paperwork-backend-2.2.1-cairo_workaround.patch b/app-text/paperwork-backend/files/paperwork-backend-2.2.1-cairo_workaround.patch
deleted file mode 100644
index 01eb2a6154b0..000000000000
--- a/app-text/paperwork-backend/files/paperwork-backend-2.2.1-cairo_workaround.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From c9430b844fbcedc9119e3d464f5f0c85feb7b197 Mon Sep 17 00:00:00 2001
-From: Jerome Flesch <jflesch@openpaper.work>
-Date: Sun, 4 Feb 2024 20:33:27 +0100
-Subject: [PATCH] Backend/docexport PDF: Workaround Cairo bug that causes
- occasional crashes when exporting to generated PDF.
-
-Closes #942
----
- .../src/paperwork_backend/docexport/pdf.py | 13 +++++++++++++
- 1 file changed, 13 insertions(+)
-
-diff --git a/paperwork-backend/src/paperwork_backend/docexport/pdf.py b/paperwork-backend/src/paperwork_backend/docexport/pdf.py
-index 160e60710..befded73c 100644
---- a/paperwork-backend/src/paperwork_backend/docexport/pdf.py
-+++ b/paperwork-backend/src/paperwork_backend/docexport/pdf.py
-@@ -115,6 +115,8 @@ class PdfCreator(object):
- )
- self.pdf_context = cairo.Context(self.pdf_surface)
-
-+ self.gc_protection = [] # WORKAROUND(Jflesch): Cairo crash
-+
- def set_page_size(self, img_size):
- # portrait or landscape
- if (img_size[0] < img_size[1]):
-@@ -187,6 +189,16 @@ class PdfCreator(object):
- "pillow_to_surface", img,
- intermediate="jpeg", quality=int(self.quality * 100)
- )
-+ # WORKAROUND(Jflesch):
-+ # If Cairo supports JPEG embedding, we use
-+ # cairo.ImageSurface.set_mime_data() instead of the usual Cairo
-+ # surface functions to draw the image. It seems this function does
-+ # not increment the ref counter of the surface object
-+ # --> the Python GC tends to collect it while Cairo is still going
-+ # to use it to generate the PDF.
-+ # --> we have to keep a reference on it ourselves, until the page has
-+ # been generated.
-+ self.gc_protection.append(img_surface)
-
- self.pdf_context.save()
- try:
-@@ -199,6 +211,7 @@ class PdfCreator(object):
-
- def next_page(self):
- self.pdf_context.show_page()
-+ self.gc_protection = [] # WORKAROUND(Jflesch): Cairo crash
-
- def finish(self):
- self.pdf_surface.flush()
---
-GitLab
-
diff --git a/app-text/paperwork-backend/paperwork-backend-2.2.1-r1.ebuild b/app-text/paperwork-backend/paperwork-backend-2.2.3.ebuild
similarity index 91%
rename from app-text/paperwork-backend/paperwork-backend-2.2.1-r1.ebuild
rename to app-text/paperwork-backend/paperwork-backend-2.2.3.ebuild
index bedb4d1adafb..122954f5aaab 100644
--- a/app-text/paperwork-backend/paperwork-backend-2.2.1-r1.ebuild
+++ b/app-text/paperwork-backend/paperwork-backend-2.2.3.ebuild
@@ -12,9 +12,10 @@ DESCRIPTION="Backend part of Paperwork (Python API, no UI)"
HOMEPAGE="https://gitlab.gnome.org/World/OpenPaperwork"
# Update from release hash at:
# https://gitlab.gnome.org/World/OpenPaperwork/paperwork/-/tags
-REL_HASH="0bea4054"
+REL_HASH="3f51346f"
SRC_URI="https://gitlab.gnome.org/World/OpenPaperwork/paperwork/-/archive/${PV}/paperwork-${PV}.tar.bz2
https://download.openpaper.work/data/paperwork/master_${REL_HASH}/data.tar.gz -> paperwork-data-${PV}.tar.gz"
+S=${WORKDIR}/paperwork-${PV}/${PN}
LICENSE="GPL-3"
SLOT="0"
@@ -44,18 +45,11 @@ BDEPEND="
media-libs/libinsane
)
"
-S=${WORKDIR}/paperwork-${PV}/${PN}
distutils_enable_tests unittest
export SETUPTOOLS_SCM_PRETEND_VERSION=${PV}
-src_prepare() {
- default
- cd "${WORKDIR}"/paperwork-${PV} || die
- eapply "${FILESDIR}"/${P}-cairo_workaround.patch
-}
-
python_compile() {
emake l10n_compile
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: app-text/paperwork-backend/files/, app-text/paperwork-backend/
@ 2024-09-26 9:57 Bernard Cafarelli
0 siblings, 0 replies; 4+ messages in thread
From: Bernard Cafarelli @ 2024-09-26 9:57 UTC (permalink / raw
To: gentoo-commits
commit: ab51059a6aa37b6b05a8000b467fb7b55a219d5c
Author: Bernard Cafarelli <voyageur <AT> gentoo <DOT> org>
AuthorDate: Thu Sep 26 09:54:08 2024 +0000
Commit: Bernard Cafarelli <voyageur <AT> gentoo <DOT> org>
CommitDate: Thu Sep 26 09:54:08 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ab51059a
app-text/paperwork-backend: drop 2.2.2
Signed-off-by: Bernard Cafarelli <voyageur <AT> gentoo.org>
app-text/paperwork-backend/Manifest | 2 -
.../files/paperwork-backend-2.2.2-scipy.patch | 55 -------------------
.../paperwork-backend-2.2.2.ebuild | 63 ----------------------
3 files changed, 120 deletions(-)
diff --git a/app-text/paperwork-backend/Manifest b/app-text/paperwork-backend/Manifest
index 9f6c193ed7f0..29962c5280e3 100644
--- a/app-text/paperwork-backend/Manifest
+++ b/app-text/paperwork-backend/Manifest
@@ -1,4 +1,2 @@
-DIST paperwork-2.2.2.tar.bz2 2531134 BLAKE2B 760d5fdc949ed44993c9845232e3f92b26b8dcb84ef82b08be7dbb0b262461feaf06f930f3fce0b94fdd8412a8264969bac117e3ea7aef70e1b47436a9dba3c0 SHA512 e0d3c24a0d611ffea231e129461d2925dc8318aaade185e83361bca8d1757e4601510db6122dc412863e617a387eb1c6008d0974c2b37be7ac4e4c3e68bc450b
DIST paperwork-2.2.3.tar.bz2 2531208 BLAKE2B 6259a9b7a916ad71fc0f0747ce0c17e874dbff962c3d8b46c4c25c2a119de6d27f0ce7ce262dfbf7290fa436726fc538d9bead2664d7f158d51634eece768620 SHA512 68bad3ccc9ed2fdea2b1336945ca4f11de5b0a2249d5f043dc34d620ae5bf6627c0255d4776a5c19e9d266972403023f0b63eb3bf694d7a33051b53239c017bf
-DIST paperwork-data-2.2.2.tar.gz 5206588 BLAKE2B 7dd15d31b0b3b59900556d78b271f36cc1cab533d273948a7d0eb364028ec0d1c26b2743a10565e2fc1d65786a11a1589c776c2ec1df6030efe8a79b2fba53a0 SHA512 aaf8e4174504eed7b33b2a0d3ad1b0af489d70bd9a425cf9363011fc6e24dd42a6822a5d078898279e78bbe15b4e36075c5a57a5ec74eabb3c2af7b9c3cc3e76
DIST paperwork-data-2.2.3.tar.gz 5206588 BLAKE2B 7dd15d31b0b3b59900556d78b271f36cc1cab533d273948a7d0eb364028ec0d1c26b2743a10565e2fc1d65786a11a1589c776c2ec1df6030efe8a79b2fba53a0 SHA512 aaf8e4174504eed7b33b2a0d3ad1b0af489d70bd9a425cf9363011fc6e24dd42a6822a5d078898279e78bbe15b4e36075c5a57a5ec74eabb3c2af7b9c3cc3e76
diff --git a/app-text/paperwork-backend/files/paperwork-backend-2.2.2-scipy.patch b/app-text/paperwork-backend/files/paperwork-backend-2.2.2-scipy.patch
deleted file mode 100644
index 9add28626a23..000000000000
--- a/app-text/paperwork-backend/files/paperwork-backend-2.2.2-scipy.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-From abcebfe9714644d4e259e53b10e0e9417b5b864f Mon Sep 17 00:00:00 2001
-From: Jerome Flesch <jflesch@openpaper.work>
-Date: Sun, 21 Apr 2024 13:31:03 +0200
-Subject: [PATCH] backend/guesswork/labels/sklearn: fix use of
- scipy.sparse.hstack() + numpy.zeros()
-
-Closes #1111
----
- .../paperwork_backend/guesswork/label/sklearn/__init__.py | 5 +++--
- paperwork-backend/src/paperwork_backend/model/fake.py | 6 ++++++
- 2 files changed, 9 insertions(+), 2 deletions(-)
-
-diff --git a/paperwork-backend/src/paperwork_backend/guesswork/label/sklearn/__init__.py b/paperwork-backend/src/paperwork_backend/guesswork/label/sklearn/__init__.py
-index b2af4350..8633211f 100644
---- a/paperwork-backend/src/paperwork_backend/guesswork/label/sklearn/__init__.py
-+++ b/paperwork-backend/src/paperwork_backend/guesswork/label/sklearn/__init__.py
-@@ -191,7 +191,8 @@ class UpdatableVectorizer(object):
- )
- if required_padding > 0:
- doc_vector = numpy.hstack([
-- doc_vector, numpy.zeros((required_padding,))
-+ doc_vector,
-+ numpy.zeros((required_padding,))
- ])
- if sum_features is None:
- sum_features = doc_vector
-@@ -339,7 +340,7 @@ class Corpus(object):
- if required_padding > 0:
- doc_vector = scipy.sparse.hstack([
- scipy.sparse.csr_matrix(doc_vector),
-- numpy.zeros((required_padding,))
-+ numpy.zeros((1, required_padding))
- ])
- else:
- doc_vector = scipy.sparse.csr_matrix(doc_vector)
-diff --git a/paperwork-backend/src/paperwork_backend/model/fake.py b/paperwork-backend/src/paperwork_backend/model/fake.py
-index 29beae97..f06fe18e 100644
---- a/paperwork-backend/src/paperwork_backend/model/fake.py
-+++ b/paperwork-backend/src/paperwork_backend/model/fake.py
-@@ -125,6 +125,12 @@ class Plugin(openpaperwork_core.PluginBase):
- if doc['url'] == doc_url:
- out.update(doc['labels'])
-
-+ def doc_has_labels_by_url(self, doc_url):
-+ for doc in self.docs:
-+ if doc['url'] == doc_url:
-+ return True if len(doc["labels"]) > 0 else None
-+ return None
-+
- def doc_add_label_by_url(self, doc_url, label, color=None):
- if color is None:
- all_labels = set()
---
-GitLab
-
diff --git a/app-text/paperwork-backend/paperwork-backend-2.2.2.ebuild b/app-text/paperwork-backend/paperwork-backend-2.2.2.ebuild
deleted file mode 100644
index 738513e7b1a6..000000000000
--- a/app-text/paperwork-backend/paperwork-backend-2.2.2.ebuild
+++ /dev/null
@@ -1,63 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-DISTUTILS_USE_PEP517=setuptools
-PYTHON_COMPAT=( python3_{10..12} )
-
-inherit distutils-r1
-
-DESCRIPTION="Backend part of Paperwork (Python API, no UI)"
-HOMEPAGE="https://gitlab.gnome.org/World/OpenPaperwork"
-# Update from release hash at:
-# https://gitlab.gnome.org/World/OpenPaperwork/paperwork/-/tags
-REL_HASH="3f51346f"
-SRC_URI="https://gitlab.gnome.org/World/OpenPaperwork/paperwork/-/archive/${PV}/paperwork-${PV}.tar.bz2
- https://download.openpaper.work/data/paperwork/master_${REL_HASH}/data.tar.gz -> paperwork-data-${PV}.tar.gz"
-S=${WORKDIR}/paperwork-${PV}/${PN}
-
-LICENSE="GPL-3"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-
-RDEPEND="
- app-text/openpaperwork-core[${PYTHON_USEDEP}]
- app-text/openpaperwork-gtk[${PYTHON_USEDEP}]
- app-text/poppler[introspection]
- dev-python/distro[${PYTHON_USEDEP}]
- dev-python/pillow[${PYTHON_USEDEP}]
- dev-python/psutil[${PYTHON_USEDEP}]
- dev-python/pycairo[${PYTHON_USEDEP}]
- dev-python/pycountry[${PYTHON_USEDEP}]
- dev-python/pygobject:3[${PYTHON_USEDEP}]
- dev-python/scikit-learn[${PYTHON_USEDEP}]
- dev-python/termcolor[${PYTHON_USEDEP}]
- dev-python/whoosh[${PYTHON_USEDEP}]
-"
-BDEPEND="
- ${RDEPEND}
- dev-python/setuptools-scm[${PYTHON_USEDEP}]
- sys-apps/which
- sys-devel/gettext
- test? (
- dev-python/libpillowfight[${PYTHON_USEDEP}]
- media-libs/libinsane
- )
-"
-
-distutils_enable_tests unittest
-
-export SETUPTOOLS_SCM_PRETEND_VERSION=${PV}
-
-src_prepare() {
- default
- cd "${WORKDIR}"/paperwork-${PV} || die
- eapply "${FILESDIR}"/${P}-scipy.patch
-}
-
-python_compile() {
- emake l10n_compile
-
- distutils-r1_python_compile
-}
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-09-26 9:57 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-26 9:57 [gentoo-commits] repo/gentoo:master commit in: app-text/paperwork-backend/files/, app-text/paperwork-backend/ Bernard Cafarelli
-- strict thread matches above, loose matches on Subject: below --
2024-06-14 10:47 Bernard Cafarelli
2024-05-06 23:05 Bernard Cafarelli
2024-02-04 23:05 Bernard Cafarelli
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox