* [PR PATCH] New package: paperwork-2.2.2
@ 2024-05-09 19:49 idealist1508
2024-05-10 1:49 ` abenson
` (24 more replies)
0 siblings, 25 replies; 26+ messages in thread
From: idealist1508 @ 2024-05-09 19:49 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1102 bytes --]
There is a new pull request by idealist1508 against master on the void-packages repository
https://github.com/idealist1508/void-packages paperwork
https://github.com/void-linux/void-packages/pull/50265
New package: paperwork-2.2.2
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES**
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture, (x86_64-glibc)
A patch file from https://github.com/void-linux/void-packages/pull/50265.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-paperwork-50265.patch --]
[-- Type: text/x-diff, Size: 10538 bytes --]
From 58695114e61a2c876a26c0ff7802ae13fae8e42d Mon Sep 17 00:00:00 2001
From: idealist1508 <id1508-github@yahoo.com>
Date: Thu, 9 May 2024 21:33:08 +0200
Subject: [PATCH] New package: paperwork-2.2.2
---
srcpkgs/libinsane/template | 14 +++++
srcpkgs/libpillowfight/template | 27 +++++++++
.../paperwork/patches/Fix4Scipy1.13.0.patch | 55 +++++++++++++++++++
srcpkgs/paperwork/template | 40 ++++++++++++++
srcpkgs/python3-fabulous/template | 13 +++++
srcpkgs/python3-pillowfight/template | 23 ++++++++
srcpkgs/python3-pyocr/template | 22 ++++++++
7 files changed, 194 insertions(+)
create mode 100644 srcpkgs/libinsane/template
create mode 100644 srcpkgs/libpillowfight/template
create mode 100644 srcpkgs/paperwork/patches/Fix4Scipy1.13.0.patch
create mode 100644 srcpkgs/paperwork/template
create mode 100644 srcpkgs/python3-fabulous/template
create mode 100644 srcpkgs/python3-pillowfight/template
create mode 100644 srcpkgs/python3-pyocr/template
diff --git a/srcpkgs/libinsane/template b/srcpkgs/libinsane/template
new file mode 100644
index 00000000000000..cc709da692065d
--- /dev/null
+++ b/srcpkgs/libinsane/template
@@ -0,0 +1,14 @@
+# Template file for 'libinsane'
+pkgname=libinsane
+version=1.0.10
+revision=1
+build_style=gnu-makefile
+hostmakedepends="meson pkg-config sane-devel vala-devel glib-devel gobject-introspection gtk-doc"
+depends="sane"
+short_desc="Crossplatform library to access scanners"
+maintainer="idealist1508 <id1508-github@yahoo.com>"
+license="LGPL-3.0-or-later"
+homepage="https://gitlab.gnome.org/World/OpenPaperwork/libinsane"
+#changelog=""
+distfiles="https://gitlab.gnome.org/World/OpenPaperwork/$pkgname/-/archive/$version/$pkgname-$version.tar.gz"
+checksum=a9b8daaef03eb3bc4a8e638131e506ff3c2f99f715170da572e7f5ce7ba76467
diff --git a/srcpkgs/libpillowfight/template b/srcpkgs/libpillowfight/template
new file mode 100644
index 00000000000000..2c3309416b6b65
--- /dev/null
+++ b/srcpkgs/libpillowfight/template
@@ -0,0 +1,27 @@
+# Template file for 'libpillowfight'
+pkgname=libpillowfight
+version=0.3.0
+revision=1
+build_style=gnu-makefile
+hostmakedepends="cmake python3 python3-wheel python3-pip"
+makedepends="python3-setuptools_scm python3-devel"
+depends="python3-pillow-simd"
+short_desc="Small library containing various image processing algorithms"
+maintainer="idealist1508 <id1508-github@yahoo.com>"
+license="GPL-2.0-only"
+homepage="https://gitlab.gnome.org/World/OpenPaperwork/libpillowfight"
+python_version=3
+
+_COMMIT="50d965879eb89fdef9be09d6e934329486ff585d"
+
+distfiles="https://gitlab.gnome.org/World/OpenPaperwork/libpillowfight/-/archive/${_COMMIT}/libpillowfight-${version}.tar.bz2"
+checksum=0f39a6b0099bf246e961e30ddb9d3c19e8f9460ee24fbfa5c463cda196209327
+
+export CMAKE_OPTS="-DCMAKE_INSTALL_PREFIX=/usr"
+export PIP_ARGS="--root=/usr"
+
+pre_build() {
+ cat > src/pillowfight/_version.h <<- EOF || die
+ #define INTERNAL_PILLOWFIGHT_VERSION "$version"
+ EOF
+}
diff --git a/srcpkgs/paperwork/patches/Fix4Scipy1.13.0.patch b/srcpkgs/paperwork/patches/Fix4Scipy1.13.0.patch
new file mode 100644
index 00000000000000..9add28626a23a7
--- /dev/null
+++ b/srcpkgs/paperwork/patches/Fix4Scipy1.13.0.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/srcpkgs/paperwork/template b/srcpkgs/paperwork/template
new file mode 100644
index 00000000000000..2b4151225a7db7
--- /dev/null
+++ b/srcpkgs/paperwork/template
@@ -0,0 +1,40 @@
+# Template file for 'paperwork'
+pkgname=paperwork
+version=2.2.2
+revision=1
+short_desc="Personal document manager for scanned documents (and PDFs)"
+maintainer="idealist1508 <id1508-github@yahoo.com>"
+license="GPL-3.0-or-later"
+homepage="https://www.openpaper.work/"
+distfiles="https://gitlab.gnome.org/World/OpenPaperwork/paperwork/-/archive/${version}/paperwork-${version}.tar.bz2"
+checksum=006b4f95d9c5665dbcd0cdbd851f7164f0abc5fbf91138157f3768d9cae3ff51
+
+python_version=3
+hostmakedepends="gettext which"
+makedepends="python3-pillow-simd python3-pillowfight python3-build python3-installer python3-setuptools_scm python3-wheel python3-distro python3-psutil python3-numpy python3-scipy python3-scikit-learn python3-pycountry python3-Whoosh python3-xdg python3-pyocr"
+depends="poppler-glib python3-distro python3-rich python3-psutil python3-pillowfight python3-pillow-simd python3-gobject python3-numpy python3-scipy python3-scikit-learn python3-distutils-extra python3-pycountry python3-Whoosh python3-xdg python3-fabulous python3-pyocr"
+
+export SETUPTOOLS_SCM_PRETEND_VERSION=${version}
+
+do_build() {
+ make l10n_compile
+
+ for dir in openpaperwork-{core,gtk} paperwork-{backend,shell,gtk}; do
+ pushd $dir
+ python -m build --wheel --no-isolation
+ popd
+ done
+}
+
+do_install() {
+ for dir in openpaperwork-{core,gtk} paperwork-{backend,shell,gtk}; do
+ pushd $dir
+ python -m installer --destdir="$DESTDIR" dist/*.whl
+ popd
+ done
+
+ PYTHONPATH="$DESTDIR"$(python -c 'import site; print(site.getsitepackages()[0])') \
+ "$DESTDIR"/usr/bin/paperwork-gtk install \
+ --icon_base_dir="$DESTDIR/usr/share/icons" \
+ --data_base_dir="$DESTDIR/usr/share"
+}
diff --git a/srcpkgs/python3-fabulous/template b/srcpkgs/python3-fabulous/template
new file mode 100644
index 00000000000000..6dbca5e73c3763
--- /dev/null
+++ b/srcpkgs/python3-fabulous/template
@@ -0,0 +1,13 @@
+# Template file for 'python3-fabulous'
+_pkgname=fabulous
+pkgname=python3-fabulous
+version=0.4.0
+revision=1
+build_style=python3-module
+makedepends="python3-build python3-installer python3-setuptools_scm python3-wheel"
+short_desc="Print images, colors, and stylish text to the terminal with Python"
+maintainer="idealist1508 <id1508-github@yahoo.com>"
+license="Apache-2.0"
+homepage="https://github.com/jart/fabulous"
+distfiles="https://github.com/jart/$_pkgname/releases/download/$version/$_pkgname-$version.tar.gz"
+checksum=60ae547be786b5c19b555939453ea8c1e906b99a93847c8baa65e7154801d14a
diff --git a/srcpkgs/python3-pillowfight/template b/srcpkgs/python3-pillowfight/template
new file mode 100644
index 00000000000000..fc383d241b0393
--- /dev/null
+++ b/srcpkgs/python3-pillowfight/template
@@ -0,0 +1,23 @@
+# Template file for 'python3-pillowfight'
+pkgname=python3-pillowfight
+version=0.3.0
+revision=1
+build_style=python3-module
+hostmakedepends="python3 python3-wheel python3-pip"
+makedepends="python3-setuptools_scm python3-devel"
+depends="python3-pillow-simd"
+short_desc="Python bindings for libpillowfigh"
+maintainer="idealist1508 <id1508-github@yahoo.com>"
+license="GPL-3.0-or-later"
+homepage="https://gitlab.gnome.org/World/OpenPaperwork/libpillowfight"
+python_version=3
+
+_COMMIT="50d965879eb89fdef9be09d6e934329486ff585d"
+distfiles="https://gitlab.gnome.org/World/OpenPaperwork/libpillowfight/-/archive/${_COMMIT}/libpillowfight-${version}.tar.bz2"
+checksum=0f39a6b0099bf246e961e30ddb9d3c19e8f9460ee24fbfa5c463cda196209327
+
+pre_build() {
+ cat > src/pillowfight/_version.h <<- EOF || die
+ #define INTERNAL_PILLOWFIGHT_VERSION "$version"
+ EOF
+}
diff --git a/srcpkgs/python3-pyocr/template b/srcpkgs/python3-pyocr/template
new file mode 100644
index 00000000000000..a32327722329d3
--- /dev/null
+++ b/srcpkgs/python3-pyocr/template
@@ -0,0 +1,22 @@
+# Template file for 'python3-pyocr'
+pkgname=python3-pyocr
+version=0.8.5
+revision=1
+build_style=python3-module
+makedepends="python3-build python3-installer python3-setuptools_scm python3-wheel"
+depends="tesseract-ocr"
+short_desc="Python wrapper for Tesseract and Cuneiform"
+maintainer="idealist1508 <id1508-github@yahoo.com>"
+license="GPL-3.0-or-later"
+homepage="https://gitlab.gnome.org/World/OpenPaperwork/pyocr"
+_COMMIT="ca191ba776743fe10a1c3dd99eaa82626ee4edc1"
+distfiles="https://gitlab.gnome.org/World/OpenPaperwork/pyocr/-/archive/${_COMMIT}/pyocr-${version}.tar.bz2"
+checksum=ba9c63cfac7bb6e441590053954466b41768e6b87f1b279c2d62460cad8bb174
+
+do_build() {
+ python -m build --wheel --no-isolation
+}
+
+do_install() {
+ python -m installer --destdir="$DESTDIR" dist/*.whl
+}
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: New package: paperwork-2.2.2
2024-05-09 19:49 [PR PATCH] New package: paperwork-2.2.2 idealist1508
@ 2024-05-10 1:49 ` abenson
2024-05-10 1:49 ` [PR REVIEW] " abenson
` (23 subsequent siblings)
24 siblings, 0 replies; 26+ messages in thread
From: abenson @ 2024-05-10 1:49 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 309 bytes --]
New comment by abenson on void-packages repository
https://github.com/void-linux/void-packages/pull/50265#issuecomment-2103704372
Comment:
Each package should have its own commit, following [these guidelines](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#committing-your-changes).
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PR REVIEW] New package: paperwork-2.2.2
2024-05-09 19:49 [PR PATCH] New package: paperwork-2.2.2 idealist1508
2024-05-10 1:49 ` abenson
@ 2024-05-10 1:49 ` abenson
2024-05-10 1:49 ` abenson
` (22 subsequent siblings)
24 siblings, 0 replies; 26+ messages in thread
From: abenson @ 2024-05-10 1:49 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 172 bytes --]
New review comment by abenson on void-packages repository
https://github.com/void-linux/void-packages/pull/50265#discussion_r1596162299
Comment:
Remove unused variables.
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PR REVIEW] New package: paperwork-2.2.2
2024-05-09 19:49 [PR PATCH] New package: paperwork-2.2.2 idealist1508
2024-05-10 1:49 ` abenson
2024-05-10 1:49 ` [PR REVIEW] " abenson
@ 2024-05-10 1:49 ` abenson
2024-05-10 1:51 ` abenson
` (21 subsequent siblings)
24 siblings, 0 replies; 26+ messages in thread
From: abenson @ 2024-05-10 1:49 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 204 bytes --]
New review comment by abenson on void-packages repository
https://github.com/void-linux/void-packages/pull/50265#discussion_r1596162442
Comment:
Most of the `-devel` packages should go in `makedepends`
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PR REVIEW] New package: paperwork-2.2.2
2024-05-09 19:49 [PR PATCH] New package: paperwork-2.2.2 idealist1508
` (2 preceding siblings ...)
2024-05-10 1:49 ` abenson
@ 2024-05-10 1:51 ` abenson
2024-05-10 1:51 ` abenson
` (20 subsequent siblings)
24 siblings, 0 replies; 26+ messages in thread
From: abenson @ 2024-05-10 1:51 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 199 bytes --]
New review comment by abenson on void-packages repository
https://github.com/void-linux/void-packages/pull/50265#discussion_r1596163150
Comment:
No need for this, `${pkgname//python3-/}` is enough
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PR REVIEW] New package: paperwork-2.2.2
2024-05-09 19:49 [PR PATCH] New package: paperwork-2.2.2 idealist1508
` (3 preceding siblings ...)
2024-05-10 1:51 ` abenson
@ 2024-05-10 1:51 ` abenson
2024-05-10 1:51 ` abenson
` (19 subsequent siblings)
24 siblings, 0 replies; 26+ messages in thread
From: abenson @ 2024-05-10 1:51 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 202 bytes --]
New review comment by abenson on void-packages repository
https://github.com/void-linux/void-packages/pull/50265#discussion_r1596163310
Comment:
Here, just use `$version`, no need for the `$_pkgname`
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PR REVIEW] New package: paperwork-2.2.2
2024-05-09 19:49 [PR PATCH] New package: paperwork-2.2.2 idealist1508
` (4 preceding siblings ...)
2024-05-10 1:51 ` abenson
@ 2024-05-10 1:51 ` abenson
2024-05-10 7:25 ` [PR PATCH] [Updated] " idealist1508
` (18 subsequent siblings)
24 siblings, 0 replies; 26+ messages in thread
From: abenson @ 2024-05-10 1:51 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 171 bytes --]
New review comment by abenson on void-packages repository
https://github.com/void-linux/void-packages/pull/50265#discussion_r1596163572
Comment:
Why does it need `pip`?
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PR PATCH] [Updated] New package: paperwork-2.2.2
2024-05-09 19:49 [PR PATCH] New package: paperwork-2.2.2 idealist1508
` (5 preceding siblings ...)
2024-05-10 1:51 ` abenson
@ 2024-05-10 7:25 ` idealist1508
2024-05-10 7:28 ` idealist1508
` (17 subsequent siblings)
24 siblings, 0 replies; 26+ messages in thread
From: idealist1508 @ 2024-05-10 7:25 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1107 bytes --]
There is an updated pull request by idealist1508 against master on the void-packages repository
https://github.com/idealist1508/void-packages paperwork
https://github.com/void-linux/void-packages/pull/50265
New package: paperwork-2.2.2
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES**
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture, (x86_64-glibc)
A patch file from https://github.com/void-linux/void-packages/pull/50265.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-paperwork-50265.patch --]
[-- Type: text/x-diff, Size: 11791 bytes --]
From ae34ca07602e0a7273eb369819594c67bb4b0479 Mon Sep 17 00:00:00 2001
From: idealist1508 <id1508-github@yahoo.com>
Date: Fri, 10 May 2024 08:06:49 +0200
Subject: [PATCH 1/6] New package: python3-fabulous-0.4.0
---
srcpkgs/python3-fabulous/template | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
create mode 100644 srcpkgs/python3-fabulous/template
diff --git a/srcpkgs/python3-fabulous/template b/srcpkgs/python3-fabulous/template
new file mode 100644
index 00000000000000..c983fe8b61e703
--- /dev/null
+++ b/srcpkgs/python3-fabulous/template
@@ -0,0 +1,16 @@
+# Template file for 'python3-fabulous'
+pkgname=python3-fabulous
+version=0.4.0
+revision=1
+build_style=python3-module
+makedepends="python3-build python3-installer python3-setuptools_scm python3-wheel"
+short_desc="Print images, colors, and stylish text to the terminal with Python"
+maintainer="idealist1508 <id1508-github@yahoo.com>"
+license="Apache-2.0"
+homepage="https://github.com/jart/fabulous"
+distfiles="https://github.com/jart/${pkgname/python3-/}/archive/refs/tags/$version.tar.gz"
+checksum=867401a5fac139516b2d611e4800d1f7b63b81151c645ac5457d3b042c6ff406
+
+do_check() {
+ true
+}
From 0123312dc9f0618aa1662c446aecc12afef8fe3e Mon Sep 17 00:00:00 2001
From: idealist1508 <id1508-github@yahoo.com>
Date: Fri, 10 May 2024 08:10:14 +0200
Subject: [PATCH 2/6] New package: libinsane-1.0.10
---
srcpkgs/libinsane/template | 14 ++++++++++++++
1 file changed, 14 insertions(+)
create mode 100644 srcpkgs/libinsane/template
diff --git a/srcpkgs/libinsane/template b/srcpkgs/libinsane/template
new file mode 100644
index 00000000000000..0a7258c73bf0f3
--- /dev/null
+++ b/srcpkgs/libinsane/template
@@ -0,0 +1,14 @@
+# Template file for 'libinsane'
+pkgname=libinsane
+version=1.0.10
+revision=1
+build_style=gnu-makefile
+hostmakedepends="meson pkg-config gobject-introspection gtk-doc"
+makedepends="sane-devel vala-devel glib-devel "
+depends="sane"
+short_desc="Crossplatform library to access scanners"
+maintainer="idealist1508 <id1508-github@yahoo.com>"
+license="LGPL-3.0-or-later"
+homepage="https://gitlab.gnome.org/World/OpenPaperwork/libinsane"
+distfiles="https://gitlab.gnome.org/World/OpenPaperwork/$pkgname/-/archive/$version/$pkgname-$version.tar.gz"
+checksum=a9b8daaef03eb3bc4a8e638131e506ff3c2f99f715170da572e7f5ce7ba76467
From bbd0f3b86bba93da624af7dde8f233e2783c5957 Mon Sep 17 00:00:00 2001
From: idealist1508 <id1508-github@yahoo.com>
Date: Fri, 10 May 2024 08:28:42 +0200
Subject: [PATCH 3/6] New package: python3-pyocr-0.8.5
---
srcpkgs/python3-pyocr/template | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
create mode 100644 srcpkgs/python3-pyocr/template
diff --git a/srcpkgs/python3-pyocr/template b/srcpkgs/python3-pyocr/template
new file mode 100644
index 00000000000000..a32327722329d3
--- /dev/null
+++ b/srcpkgs/python3-pyocr/template
@@ -0,0 +1,22 @@
+# Template file for 'python3-pyocr'
+pkgname=python3-pyocr
+version=0.8.5
+revision=1
+build_style=python3-module
+makedepends="python3-build python3-installer python3-setuptools_scm python3-wheel"
+depends="tesseract-ocr"
+short_desc="Python wrapper for Tesseract and Cuneiform"
+maintainer="idealist1508 <id1508-github@yahoo.com>"
+license="GPL-3.0-or-later"
+homepage="https://gitlab.gnome.org/World/OpenPaperwork/pyocr"
+_COMMIT="ca191ba776743fe10a1c3dd99eaa82626ee4edc1"
+distfiles="https://gitlab.gnome.org/World/OpenPaperwork/pyocr/-/archive/${_COMMIT}/pyocr-${version}.tar.bz2"
+checksum=ba9c63cfac7bb6e441590053954466b41768e6b87f1b279c2d62460cad8bb174
+
+do_build() {
+ python -m build --wheel --no-isolation
+}
+
+do_install() {
+ python -m installer --destdir="$DESTDIR" dist/*.whl
+}
From f8fb1d6ce6d18d99d20964135910ede6457195e0 Mon Sep 17 00:00:00 2001
From: idealist1508 <id1508-github@yahoo.com>
Date: Fri, 10 May 2024 08:46:15 +0200
Subject: [PATCH 4/6] New package: libpillowfight-0.3.0
---
srcpkgs/libpillowfight/template | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
create mode 100644 srcpkgs/libpillowfight/template
diff --git a/srcpkgs/libpillowfight/template b/srcpkgs/libpillowfight/template
new file mode 100644
index 00000000000000..d8ad101e12dbd5
--- /dev/null
+++ b/srcpkgs/libpillowfight/template
@@ -0,0 +1,27 @@
+# Template file for 'libpillowfight'
+pkgname=libpillowfight
+version=0.3.0
+revision=1
+build_style=gnu-makefile
+hostmakedepends="cmake python3 python3-wheel python3-nose"
+makedepends="python3-setuptools_scm python3-devel"
+depends="python3-pillow-simd"
+checkdepends="flake8"
+short_desc="Small library containing various image processing algorithms"
+maintainer="idealist1508 <id1508-github@yahoo.com>"
+license="GPL-2.0-only"
+homepage="https://gitlab.gnome.org/World/OpenPaperwork/libpillowfight"
+
+_COMMIT="50d965879eb89fdef9be09d6e934329486ff585d"
+
+distfiles="https://gitlab.gnome.org/World/OpenPaperwork/libpillowfight/-/archive/${_COMMIT}/libpillowfight-${version}.tar.bz2"
+checksum=0f39a6b0099bf246e961e30ddb9d3c19e8f9460ee24fbfa5c463cda196209327
+
+export CMAKE_OPTS="-DCMAKE_INSTALL_PREFIX=/usr"
+export PIP_ARGS="--root=/usr"
+
+pre_build() {
+ cat > src/pillowfight/_version.h <<- EOF || die
+ #define INTERNAL_PILLOWFIGHT_VERSION "$version"
+ EOF
+}
From c4faec9f4934f43158ddb4915bf5c123af9c574b Mon Sep 17 00:00:00 2001
From: idealist1508 <id1508-github@yahoo.com>
Date: Fri, 10 May 2024 09:12:33 +0200
Subject: [PATCH 5/6] New package: python3-pillowfight-0.3.0
---
srcpkgs/python3-pillowfight/template | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
create mode 100644 srcpkgs/python3-pillowfight/template
diff --git a/srcpkgs/python3-pillowfight/template b/srcpkgs/python3-pillowfight/template
new file mode 100644
index 00000000000000..bc24f348d52762
--- /dev/null
+++ b/srcpkgs/python3-pillowfight/template
@@ -0,0 +1,24 @@
+# Template file for 'python3-pillowfight'
+pkgname=python3-pillowfight
+version=0.3.0
+revision=1
+build_style=python3-module
+hostmakedepends="python3-nose"
+makedepends="python3-devel"
+depends="python3-pillow-simd"
+checkdepends="python3-pillow-simd"
+short_desc="Python bindings for libpillowfigh"
+maintainer="idealist1508 <id1508-github@yahoo.com>"
+license="GPL-3.0-or-later"
+homepage="https://gitlab.gnome.org/World/OpenPaperwork/libpillowfight"
+python_version=3
+
+_COMMIT="50d965879eb89fdef9be09d6e934329486ff585d"
+distfiles="https://gitlab.gnome.org/World/OpenPaperwork/libpillowfight/-/archive/${_COMMIT}/libpillowfight-${version}.tar.bz2"
+checksum=0f39a6b0099bf246e961e30ddb9d3c19e8f9460ee24fbfa5c463cda196209327
+
+pre_build() {
+ cat > src/pillowfight/_version.h <<- EOF || die
+ #define INTERNAL_PILLOWFIGHT_VERSION "$version"
+ EOF
+}
From 86ef97275cb4380ad1b1bc8a9d91f01384021d3b Mon Sep 17 00:00:00 2001
From: idealist1508 <id1508-github@yahoo.com>
Date: Fri, 10 May 2024 09:14:47 +0200
Subject: [PATCH 6/6] New package: paperwork-2.2.2
---
.../paperwork/patches/Fix4Scipy1.13.0.patch | 55 +++++++++++++++++++
srcpkgs/paperwork/template | 40 ++++++++++++++
2 files changed, 95 insertions(+)
create mode 100644 srcpkgs/paperwork/patches/Fix4Scipy1.13.0.patch
create mode 100644 srcpkgs/paperwork/template
diff --git a/srcpkgs/paperwork/patches/Fix4Scipy1.13.0.patch b/srcpkgs/paperwork/patches/Fix4Scipy1.13.0.patch
new file mode 100644
index 00000000000000..9add28626a23a7
--- /dev/null
+++ b/srcpkgs/paperwork/patches/Fix4Scipy1.13.0.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/srcpkgs/paperwork/template b/srcpkgs/paperwork/template
new file mode 100644
index 00000000000000..2b4151225a7db7
--- /dev/null
+++ b/srcpkgs/paperwork/template
@@ -0,0 +1,40 @@
+# Template file for 'paperwork'
+pkgname=paperwork
+version=2.2.2
+revision=1
+short_desc="Personal document manager for scanned documents (and PDFs)"
+maintainer="idealist1508 <id1508-github@yahoo.com>"
+license="GPL-3.0-or-later"
+homepage="https://www.openpaper.work/"
+distfiles="https://gitlab.gnome.org/World/OpenPaperwork/paperwork/-/archive/${version}/paperwork-${version}.tar.bz2"
+checksum=006b4f95d9c5665dbcd0cdbd851f7164f0abc5fbf91138157f3768d9cae3ff51
+
+python_version=3
+hostmakedepends="gettext which"
+makedepends="python3-pillow-simd python3-pillowfight python3-build python3-installer python3-setuptools_scm python3-wheel python3-distro python3-psutil python3-numpy python3-scipy python3-scikit-learn python3-pycountry python3-Whoosh python3-xdg python3-pyocr"
+depends="poppler-glib python3-distro python3-rich python3-psutil python3-pillowfight python3-pillow-simd python3-gobject python3-numpy python3-scipy python3-scikit-learn python3-distutils-extra python3-pycountry python3-Whoosh python3-xdg python3-fabulous python3-pyocr"
+
+export SETUPTOOLS_SCM_PRETEND_VERSION=${version}
+
+do_build() {
+ make l10n_compile
+
+ for dir in openpaperwork-{core,gtk} paperwork-{backend,shell,gtk}; do
+ pushd $dir
+ python -m build --wheel --no-isolation
+ popd
+ done
+}
+
+do_install() {
+ for dir in openpaperwork-{core,gtk} paperwork-{backend,shell,gtk}; do
+ pushd $dir
+ python -m installer --destdir="$DESTDIR" dist/*.whl
+ popd
+ done
+
+ PYTHONPATH="$DESTDIR"$(python -c 'import site; print(site.getsitepackages()[0])') \
+ "$DESTDIR"/usr/bin/paperwork-gtk install \
+ --icon_base_dir="$DESTDIR/usr/share/icons" \
+ --data_base_dir="$DESTDIR/usr/share"
+}
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: New package: paperwork-2.2.2
2024-05-09 19:49 [PR PATCH] New package: paperwork-2.2.2 idealist1508
` (6 preceding siblings ...)
2024-05-10 7:25 ` [PR PATCH] [Updated] " idealist1508
@ 2024-05-10 7:28 ` idealist1508
2024-05-11 3:03 ` [PR REVIEW] " abenson
` (16 subsequent siblings)
24 siblings, 0 replies; 26+ messages in thread
From: idealist1508 @ 2024-05-10 7:28 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 324 bytes --]
New comment by idealist1508 on void-packages repository
https://github.com/void-linux/void-packages/pull/50265#issuecomment-2104076104
Comment:
> Each package should have its own commit, following [these guidelines](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#committing-your-changes).
Done
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PR REVIEW] New package: paperwork-2.2.2
2024-05-09 19:49 [PR PATCH] New package: paperwork-2.2.2 idealist1508
` (7 preceding siblings ...)
2024-05-10 7:28 ` idealist1508
@ 2024-05-11 3:03 ` abenson
2024-05-11 3:06 ` abenson
` (15 subsequent siblings)
24 siblings, 0 replies; 26+ messages in thread
From: abenson @ 2024-05-11 3:03 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 271 bytes --]
New review comment by abenson on void-packages repository
https://github.com/void-linux/void-packages/pull/50265#discussion_r1597341659
Comment:
Why not `https://gitlab.gnome.org/World/OpenPaperwork/libpillowfight/-/archive/${version}/libpillowfight-${version}.tar.gz`
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PR REVIEW] New package: paperwork-2.2.2
2024-05-09 19:49 [PR PATCH] New package: paperwork-2.2.2 idealist1508
` (8 preceding siblings ...)
2024-05-11 3:03 ` [PR REVIEW] " abenson
@ 2024-05-11 3:06 ` abenson
2024-05-11 12:56 ` [PR PATCH] [Updated] " idealist1508
` (14 subsequent siblings)
24 siblings, 0 replies; 26+ messages in thread
From: abenson @ 2024-05-11 3:06 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 168 bytes --]
New review comment by abenson on void-packages repository
https://github.com/void-linux/void-packages/pull/50265#discussion_r1597341891
Comment:
Same for the others.
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PR PATCH] [Updated] New package: paperwork-2.2.2
2024-05-09 19:49 [PR PATCH] New package: paperwork-2.2.2 idealist1508
` (9 preceding siblings ...)
2024-05-11 3:06 ` abenson
@ 2024-05-11 12:56 ` idealist1508
2024-05-11 13:01 ` idealist1508
` (13 subsequent siblings)
24 siblings, 0 replies; 26+ messages in thread
From: idealist1508 @ 2024-05-11 12:56 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1107 bytes --]
There is an updated pull request by idealist1508 against master on the void-packages repository
https://github.com/idealist1508/void-packages paperwork
https://github.com/void-linux/void-packages/pull/50265
New package: paperwork-2.2.2
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES**
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture, (x86_64-glibc)
A patch file from https://github.com/void-linux/void-packages/pull/50265.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-paperwork-50265.patch --]
[-- Type: text/x-diff, Size: 11603 bytes --]
From ae34ca07602e0a7273eb369819594c67bb4b0479 Mon Sep 17 00:00:00 2001
From: idealist1508 <id1508-github@yahoo.com>
Date: Fri, 10 May 2024 08:06:49 +0200
Subject: [PATCH 1/6] New package: python3-fabulous-0.4.0
---
srcpkgs/python3-fabulous/template | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
create mode 100644 srcpkgs/python3-fabulous/template
diff --git a/srcpkgs/python3-fabulous/template b/srcpkgs/python3-fabulous/template
new file mode 100644
index 00000000000000..c983fe8b61e703
--- /dev/null
+++ b/srcpkgs/python3-fabulous/template
@@ -0,0 +1,16 @@
+# Template file for 'python3-fabulous'
+pkgname=python3-fabulous
+version=0.4.0
+revision=1
+build_style=python3-module
+makedepends="python3-build python3-installer python3-setuptools_scm python3-wheel"
+short_desc="Print images, colors, and stylish text to the terminal with Python"
+maintainer="idealist1508 <id1508-github@yahoo.com>"
+license="Apache-2.0"
+homepage="https://github.com/jart/fabulous"
+distfiles="https://github.com/jart/${pkgname/python3-/}/archive/refs/tags/$version.tar.gz"
+checksum=867401a5fac139516b2d611e4800d1f7b63b81151c645ac5457d3b042c6ff406
+
+do_check() {
+ true
+}
From 0123312dc9f0618aa1662c446aecc12afef8fe3e Mon Sep 17 00:00:00 2001
From: idealist1508 <id1508-github@yahoo.com>
Date: Fri, 10 May 2024 08:10:14 +0200
Subject: [PATCH 2/6] New package: libinsane-1.0.10
---
srcpkgs/libinsane/template | 14 ++++++++++++++
1 file changed, 14 insertions(+)
create mode 100644 srcpkgs/libinsane/template
diff --git a/srcpkgs/libinsane/template b/srcpkgs/libinsane/template
new file mode 100644
index 00000000000000..0a7258c73bf0f3
--- /dev/null
+++ b/srcpkgs/libinsane/template
@@ -0,0 +1,14 @@
+# Template file for 'libinsane'
+pkgname=libinsane
+version=1.0.10
+revision=1
+build_style=gnu-makefile
+hostmakedepends="meson pkg-config gobject-introspection gtk-doc"
+makedepends="sane-devel vala-devel glib-devel "
+depends="sane"
+short_desc="Crossplatform library to access scanners"
+maintainer="idealist1508 <id1508-github@yahoo.com>"
+license="LGPL-3.0-or-later"
+homepage="https://gitlab.gnome.org/World/OpenPaperwork/libinsane"
+distfiles="https://gitlab.gnome.org/World/OpenPaperwork/$pkgname/-/archive/$version/$pkgname-$version.tar.gz"
+checksum=a9b8daaef03eb3bc4a8e638131e506ff3c2f99f715170da572e7f5ce7ba76467
From 349b5836ae690c56c9f647fc13bab91583f0ee7e Mon Sep 17 00:00:00 2001
From: idealist1508 <id1508-github@yahoo.com>
Date: Fri, 10 May 2024 08:28:42 +0200
Subject: [PATCH 3/6] New package: python3-pyocr-0.8.5
---
srcpkgs/python3-pyocr/template | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
create mode 100644 srcpkgs/python3-pyocr/template
diff --git a/srcpkgs/python3-pyocr/template b/srcpkgs/python3-pyocr/template
new file mode 100644
index 00000000000000..5e89b60cb43767
--- /dev/null
+++ b/srcpkgs/python3-pyocr/template
@@ -0,0 +1,21 @@
+# Template file for 'python3-pyocr'
+pkgname=python3-pyocr
+version=0.8.5
+revision=1
+build_style=python3-module
+makedepends="python3-build python3-installer python3-setuptools_scm python3-wheel"
+depends="tesseract-ocr"
+short_desc="Python wrapper for Tesseract and Cuneiform"
+maintainer="idealist1508 <id1508-github@yahoo.com>"
+license="GPL-3.0-or-later"
+homepage="https://gitlab.gnome.org/World/OpenPaperwork/pyocr"
+distfiles="https://gitlab.gnome.org/World/OpenPaperwork/pyocr/-/archive/${version}/pyocr-${version}.tar.bz2"
+checksum=ba9c63cfac7bb6e441590053954466b41768e6b87f1b279c2d62460cad8bb174
+
+do_build() {
+ python -m build --wheel --no-isolation
+}
+
+do_install() {
+ python -m installer --destdir="$DESTDIR" dist/*.whl
+}
From c201df0480994eb3f914d96a6c02c12fada8db03 Mon Sep 17 00:00:00 2001
From: idealist1508 <id1508-github@yahoo.com>
Date: Fri, 10 May 2024 08:46:15 +0200
Subject: [PATCH 4/6] New package: libpillowfight-0.3.0
---
srcpkgs/libpillowfight/template | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
create mode 100644 srcpkgs/libpillowfight/template
diff --git a/srcpkgs/libpillowfight/template b/srcpkgs/libpillowfight/template
new file mode 100644
index 00000000000000..92db61fc8bfcc9
--- /dev/null
+++ b/srcpkgs/libpillowfight/template
@@ -0,0 +1,24 @@
+# Template file for 'libpillowfight'
+pkgname=libpillowfight
+version=0.3.0
+revision=1
+build_style=gnu-makefile
+hostmakedepends="cmake python3 python3-wheel python3-nose"
+makedepends="python3-setuptools_scm python3-devel"
+depends="python3-pillow-simd"
+checkdepends="flake8"
+short_desc="Small library containing various image processing algorithms"
+maintainer="idealist1508 <id1508-github@yahoo.com>"
+license="GPL-2.0-only"
+homepage="https://gitlab.gnome.org/World/OpenPaperwork/libpillowfight"
+distfiles="https://gitlab.gnome.org/World/OpenPaperwork/libpillowfight/-/archive/${version}/libpillowfight-${version}.tar.bz2"
+checksum=0f39a6b0099bf246e961e30ddb9d3c19e8f9460ee24fbfa5c463cda196209327
+
+export CMAKE_OPTS="-DCMAKE_INSTALL_PREFIX=/usr"
+export PIP_ARGS="--root=/usr"
+
+pre_build() {
+ cat > src/pillowfight/_version.h <<- EOF || die
+ #define INTERNAL_PILLOWFIGHT_VERSION "$version"
+ EOF
+}
From 5529b99b1962e2b9255d5b7bcdaf06d270972cd7 Mon Sep 17 00:00:00 2001
From: idealist1508 <id1508-github@yahoo.com>
Date: Fri, 10 May 2024 09:12:33 +0200
Subject: [PATCH 5/6] New package: python3-pillowfight-0.3.0
---
srcpkgs/python3-pillowfight/template | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
create mode 100644 srcpkgs/python3-pillowfight/template
diff --git a/srcpkgs/python3-pillowfight/template b/srcpkgs/python3-pillowfight/template
new file mode 100644
index 00000000000000..b3ce8c87db9524
--- /dev/null
+++ b/srcpkgs/python3-pillowfight/template
@@ -0,0 +1,22 @@
+# Template file for 'python3-pillowfight'
+pkgname=python3-pillowfight
+version=0.3.0
+revision=1
+build_style=python3-module
+hostmakedepends="python3-nose"
+makedepends="python3-devel"
+depends="python3-Pillow"
+checkdepends="python3-Pillow"
+short_desc="Python bindings for libpillowfigh"
+maintainer="idealist1508 <id1508-github@yahoo.com>"
+license="GPL-3.0-or-later"
+homepage="https://gitlab.gnome.org/World/OpenPaperwork/libpillowfight"
+python_version=3
+distfiles="https://gitlab.gnome.org/World/OpenPaperwork/libpillowfight/-/archive/${version}/libpillowfight-${version}.tar.bz2"
+checksum=0f39a6b0099bf246e961e30ddb9d3c19e8f9460ee24fbfa5c463cda196209327
+
+pre_build() {
+ cat > src/pillowfight/_version.h <<- EOF || die
+ #define INTERNAL_PILLOWFIGHT_VERSION "$version"
+ EOF
+}
From d4db418ef0ddff92290991169742714de7ea4e2b Mon Sep 17 00:00:00 2001
From: idealist1508 <id1508-github@yahoo.com>
Date: Fri, 10 May 2024 09:14:47 +0200
Subject: [PATCH 6/6] New package: paperwork-2.2.2
---
.../paperwork/patches/Fix4Scipy1.13.0.patch | 55 +++++++++++++++++++
srcpkgs/paperwork/template | 40 ++++++++++++++
2 files changed, 95 insertions(+)
create mode 100644 srcpkgs/paperwork/patches/Fix4Scipy1.13.0.patch
create mode 100644 srcpkgs/paperwork/template
diff --git a/srcpkgs/paperwork/patches/Fix4Scipy1.13.0.patch b/srcpkgs/paperwork/patches/Fix4Scipy1.13.0.patch
new file mode 100644
index 00000000000000..9add28626a23a7
--- /dev/null
+++ b/srcpkgs/paperwork/patches/Fix4Scipy1.13.0.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/srcpkgs/paperwork/template b/srcpkgs/paperwork/template
new file mode 100644
index 00000000000000..5a86acb7d56efd
--- /dev/null
+++ b/srcpkgs/paperwork/template
@@ -0,0 +1,40 @@
+# Template file for 'paperwork'
+pkgname=paperwork
+version=2.2.2
+revision=1
+short_desc="Personal document manager for scanned documents (and PDFs)"
+maintainer="idealist1508 <id1508-github@yahoo.com>"
+license="GPL-3.0-or-later"
+homepage="https://www.openpaper.work/"
+distfiles="https://gitlab.gnome.org/World/OpenPaperwork/paperwork/-/archive/${version}/paperwork-${version}.tar.bz2"
+checksum=006b4f95d9c5665dbcd0cdbd851f7164f0abc5fbf91138157f3768d9cae3ff51
+
+python_version=3
+hostmakedepends="gettext which"
+makedepends="python3-Pillow python3-pillowfight python3-build python3-installer python3-setuptools_scm python3-wheel python3-distro python3-psutil python3-numpy python3-scipy python3-scikit-learn python3-pycountry python3-Whoosh python3-xdg python3-pyocr"
+depends="poppler-glib python3-distro python3-rich python3-psutil python3-pillowfight python3-Pillow python3-gobject python3-numpy python3-scipy python3-scikit-learn python3-distutils-extra python3-pycountry python3-Whoosh python3-xdg python3-fabulous python3-pyocr"
+
+export SETUPTOOLS_SCM_PRETEND_VERSION=${version}
+
+do_build() {
+ make l10n_compile
+
+ for dir in openpaperwork-{core,gtk} paperwork-{backend,shell,gtk}; do
+ pushd $dir
+ python -m build --wheel --no-isolation
+ popd
+ done
+}
+
+do_install() {
+ for dir in openpaperwork-{core,gtk} paperwork-{backend,shell,gtk}; do
+ pushd $dir
+ python -m installer --destdir="$DESTDIR" dist/*.whl
+ popd
+ done
+
+ PYTHONPATH="$DESTDIR"$(python -c 'import site; print(site.getsitepackages()[0])') \
+ "$DESTDIR"/usr/bin/paperwork-gtk install \
+ --icon_base_dir="$DESTDIR/usr/share/icons" \
+ --data_base_dir="$DESTDIR/usr/share"
+}
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PR PATCH] [Updated] New package: paperwork-2.2.2
2024-05-09 19:49 [PR PATCH] New package: paperwork-2.2.2 idealist1508
` (10 preceding siblings ...)
2024-05-11 12:56 ` [PR PATCH] [Updated] " idealist1508
@ 2024-05-11 13:01 ` idealist1508
2024-05-11 13:03 ` [PR REVIEW] " idealist1508
` (12 subsequent siblings)
24 siblings, 0 replies; 26+ messages in thread
From: idealist1508 @ 2024-05-11 13:01 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1107 bytes --]
There is an updated pull request by idealist1508 against master on the void-packages repository
https://github.com/idealist1508/void-packages paperwork
https://github.com/void-linux/void-packages/pull/50265
New package: paperwork-2.2.2
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES**
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture, (x86_64-glibc)
A patch file from https://github.com/void-linux/void-packages/pull/50265.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-paperwork-50265.patch --]
[-- Type: text/x-diff, Size: 11598 bytes --]
From ae34ca07602e0a7273eb369819594c67bb4b0479 Mon Sep 17 00:00:00 2001
From: idealist1508 <id1508-github@yahoo.com>
Date: Fri, 10 May 2024 08:06:49 +0200
Subject: [PATCH 1/6] New package: python3-fabulous-0.4.0
---
srcpkgs/python3-fabulous/template | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
create mode 100644 srcpkgs/python3-fabulous/template
diff --git a/srcpkgs/python3-fabulous/template b/srcpkgs/python3-fabulous/template
new file mode 100644
index 00000000000000..c983fe8b61e703
--- /dev/null
+++ b/srcpkgs/python3-fabulous/template
@@ -0,0 +1,16 @@
+# Template file for 'python3-fabulous'
+pkgname=python3-fabulous
+version=0.4.0
+revision=1
+build_style=python3-module
+makedepends="python3-build python3-installer python3-setuptools_scm python3-wheel"
+short_desc="Print images, colors, and stylish text to the terminal with Python"
+maintainer="idealist1508 <id1508-github@yahoo.com>"
+license="Apache-2.0"
+homepage="https://github.com/jart/fabulous"
+distfiles="https://github.com/jart/${pkgname/python3-/}/archive/refs/tags/$version.tar.gz"
+checksum=867401a5fac139516b2d611e4800d1f7b63b81151c645ac5457d3b042c6ff406
+
+do_check() {
+ true
+}
From 0123312dc9f0618aa1662c446aecc12afef8fe3e Mon Sep 17 00:00:00 2001
From: idealist1508 <id1508-github@yahoo.com>
Date: Fri, 10 May 2024 08:10:14 +0200
Subject: [PATCH 2/6] New package: libinsane-1.0.10
---
srcpkgs/libinsane/template | 14 ++++++++++++++
1 file changed, 14 insertions(+)
create mode 100644 srcpkgs/libinsane/template
diff --git a/srcpkgs/libinsane/template b/srcpkgs/libinsane/template
new file mode 100644
index 00000000000000..0a7258c73bf0f3
--- /dev/null
+++ b/srcpkgs/libinsane/template
@@ -0,0 +1,14 @@
+# Template file for 'libinsane'
+pkgname=libinsane
+version=1.0.10
+revision=1
+build_style=gnu-makefile
+hostmakedepends="meson pkg-config gobject-introspection gtk-doc"
+makedepends="sane-devel vala-devel glib-devel "
+depends="sane"
+short_desc="Crossplatform library to access scanners"
+maintainer="idealist1508 <id1508-github@yahoo.com>"
+license="LGPL-3.0-or-later"
+homepage="https://gitlab.gnome.org/World/OpenPaperwork/libinsane"
+distfiles="https://gitlab.gnome.org/World/OpenPaperwork/$pkgname/-/archive/$version/$pkgname-$version.tar.gz"
+checksum=a9b8daaef03eb3bc4a8e638131e506ff3c2f99f715170da572e7f5ce7ba76467
From 349b5836ae690c56c9f647fc13bab91583f0ee7e Mon Sep 17 00:00:00 2001
From: idealist1508 <id1508-github@yahoo.com>
Date: Fri, 10 May 2024 08:28:42 +0200
Subject: [PATCH 3/6] New package: python3-pyocr-0.8.5
---
srcpkgs/python3-pyocr/template | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
create mode 100644 srcpkgs/python3-pyocr/template
diff --git a/srcpkgs/python3-pyocr/template b/srcpkgs/python3-pyocr/template
new file mode 100644
index 00000000000000..5e89b60cb43767
--- /dev/null
+++ b/srcpkgs/python3-pyocr/template
@@ -0,0 +1,21 @@
+# Template file for 'python3-pyocr'
+pkgname=python3-pyocr
+version=0.8.5
+revision=1
+build_style=python3-module
+makedepends="python3-build python3-installer python3-setuptools_scm python3-wheel"
+depends="tesseract-ocr"
+short_desc="Python wrapper for Tesseract and Cuneiform"
+maintainer="idealist1508 <id1508-github@yahoo.com>"
+license="GPL-3.0-or-later"
+homepage="https://gitlab.gnome.org/World/OpenPaperwork/pyocr"
+distfiles="https://gitlab.gnome.org/World/OpenPaperwork/pyocr/-/archive/${version}/pyocr-${version}.tar.bz2"
+checksum=ba9c63cfac7bb6e441590053954466b41768e6b87f1b279c2d62460cad8bb174
+
+do_build() {
+ python -m build --wheel --no-isolation
+}
+
+do_install() {
+ python -m installer --destdir="$DESTDIR" dist/*.whl
+}
From f2d848e25651463c76c485c0c2676dfef66a196c Mon Sep 17 00:00:00 2001
From: idealist1508 <id1508-github@yahoo.com>
Date: Fri, 10 May 2024 08:46:15 +0200
Subject: [PATCH 4/6] New package: libpillowfight-0.3.0
---
srcpkgs/libpillowfight/template | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
create mode 100644 srcpkgs/libpillowfight/template
diff --git a/srcpkgs/libpillowfight/template b/srcpkgs/libpillowfight/template
new file mode 100644
index 00000000000000..a9adbb7187fced
--- /dev/null
+++ b/srcpkgs/libpillowfight/template
@@ -0,0 +1,24 @@
+# Template file for 'libpillowfight'
+pkgname=libpillowfight
+version=0.3.0
+revision=1
+build_style=gnu-makefile
+hostmakedepends="cmake python3 python3-wheel python3-nose"
+makedepends="python3-setuptools_scm python3-devel"
+depends="python3-Pillow"
+checkdepends="flake8"
+short_desc="Small library containing various image processing algorithms"
+maintainer="idealist1508 <id1508-github@yahoo.com>"
+license="GPL-2.0-only"
+homepage="https://gitlab.gnome.org/World/OpenPaperwork/libpillowfight"
+distfiles="https://gitlab.gnome.org/World/OpenPaperwork/libpillowfight/-/archive/${version}/libpillowfight-${version}.tar.bz2"
+checksum=0f39a6b0099bf246e961e30ddb9d3c19e8f9460ee24fbfa5c463cda196209327
+
+export CMAKE_OPTS="-DCMAKE_INSTALL_PREFIX=/usr"
+export PIP_ARGS="--root=/usr"
+
+pre_build() {
+ cat > src/pillowfight/_version.h <<- EOF || die
+ #define INTERNAL_PILLOWFIGHT_VERSION "$version"
+ EOF
+}
From 33e26dfd5dc1c42f2621885f08c867da4fb0b080 Mon Sep 17 00:00:00 2001
From: idealist1508 <id1508-github@yahoo.com>
Date: Fri, 10 May 2024 09:12:33 +0200
Subject: [PATCH 5/6] New package: python3-pillowfight-0.3.0
---
srcpkgs/python3-pillowfight/template | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
create mode 100644 srcpkgs/python3-pillowfight/template
diff --git a/srcpkgs/python3-pillowfight/template b/srcpkgs/python3-pillowfight/template
new file mode 100644
index 00000000000000..b3ce8c87db9524
--- /dev/null
+++ b/srcpkgs/python3-pillowfight/template
@@ -0,0 +1,22 @@
+# Template file for 'python3-pillowfight'
+pkgname=python3-pillowfight
+version=0.3.0
+revision=1
+build_style=python3-module
+hostmakedepends="python3-nose"
+makedepends="python3-devel"
+depends="python3-Pillow"
+checkdepends="python3-Pillow"
+short_desc="Python bindings for libpillowfigh"
+maintainer="idealist1508 <id1508-github@yahoo.com>"
+license="GPL-3.0-or-later"
+homepage="https://gitlab.gnome.org/World/OpenPaperwork/libpillowfight"
+python_version=3
+distfiles="https://gitlab.gnome.org/World/OpenPaperwork/libpillowfight/-/archive/${version}/libpillowfight-${version}.tar.bz2"
+checksum=0f39a6b0099bf246e961e30ddb9d3c19e8f9460ee24fbfa5c463cda196209327
+
+pre_build() {
+ cat > src/pillowfight/_version.h <<- EOF || die
+ #define INTERNAL_PILLOWFIGHT_VERSION "$version"
+ EOF
+}
From a6c80f04a98e897131b19222b61834f398fdb7d7 Mon Sep 17 00:00:00 2001
From: idealist1508 <id1508-github@yahoo.com>
Date: Fri, 10 May 2024 09:14:47 +0200
Subject: [PATCH 6/6] New package: paperwork-2.2.2
---
.../paperwork/patches/Fix4Scipy1.13.0.patch | 55 +++++++++++++++++++
srcpkgs/paperwork/template | 40 ++++++++++++++
2 files changed, 95 insertions(+)
create mode 100644 srcpkgs/paperwork/patches/Fix4Scipy1.13.0.patch
create mode 100644 srcpkgs/paperwork/template
diff --git a/srcpkgs/paperwork/patches/Fix4Scipy1.13.0.patch b/srcpkgs/paperwork/patches/Fix4Scipy1.13.0.patch
new file mode 100644
index 00000000000000..9add28626a23a7
--- /dev/null
+++ b/srcpkgs/paperwork/patches/Fix4Scipy1.13.0.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/srcpkgs/paperwork/template b/srcpkgs/paperwork/template
new file mode 100644
index 00000000000000..5a86acb7d56efd
--- /dev/null
+++ b/srcpkgs/paperwork/template
@@ -0,0 +1,40 @@
+# Template file for 'paperwork'
+pkgname=paperwork
+version=2.2.2
+revision=1
+short_desc="Personal document manager for scanned documents (and PDFs)"
+maintainer="idealist1508 <id1508-github@yahoo.com>"
+license="GPL-3.0-or-later"
+homepage="https://www.openpaper.work/"
+distfiles="https://gitlab.gnome.org/World/OpenPaperwork/paperwork/-/archive/${version}/paperwork-${version}.tar.bz2"
+checksum=006b4f95d9c5665dbcd0cdbd851f7164f0abc5fbf91138157f3768d9cae3ff51
+
+python_version=3
+hostmakedepends="gettext which"
+makedepends="python3-Pillow python3-pillowfight python3-build python3-installer python3-setuptools_scm python3-wheel python3-distro python3-psutil python3-numpy python3-scipy python3-scikit-learn python3-pycountry python3-Whoosh python3-xdg python3-pyocr"
+depends="poppler-glib python3-distro python3-rich python3-psutil python3-pillowfight python3-Pillow python3-gobject python3-numpy python3-scipy python3-scikit-learn python3-distutils-extra python3-pycountry python3-Whoosh python3-xdg python3-fabulous python3-pyocr"
+
+export SETUPTOOLS_SCM_PRETEND_VERSION=${version}
+
+do_build() {
+ make l10n_compile
+
+ for dir in openpaperwork-{core,gtk} paperwork-{backend,shell,gtk}; do
+ pushd $dir
+ python -m build --wheel --no-isolation
+ popd
+ done
+}
+
+do_install() {
+ for dir in openpaperwork-{core,gtk} paperwork-{backend,shell,gtk}; do
+ pushd $dir
+ python -m installer --destdir="$DESTDIR" dist/*.whl
+ popd
+ done
+
+ PYTHONPATH="$DESTDIR"$(python -c 'import site; print(site.getsitepackages()[0])') \
+ "$DESTDIR"/usr/bin/paperwork-gtk install \
+ --icon_base_dir="$DESTDIR/usr/share/icons" \
+ --data_base_dir="$DESTDIR/usr/share"
+}
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PR REVIEW] New package: paperwork-2.2.2
2024-05-09 19:49 [PR PATCH] New package: paperwork-2.2.2 idealist1508
` (11 preceding siblings ...)
2024-05-11 13:01 ` idealist1508
@ 2024-05-11 13:03 ` idealist1508
2024-05-11 13:34 ` idealist1508
` (11 subsequent siblings)
24 siblings, 0 replies; 26+ messages in thread
From: idealist1508 @ 2024-05-11 13:03 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 188 bytes --]
New review comment by idealist1508 on void-packages repository
https://github.com/void-linux/void-packages/pull/50265#discussion_r1597445821
Comment:
I used Arch PKGBUILD as a template.
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PR REVIEW] New package: paperwork-2.2.2
2024-05-09 19:49 [PR PATCH] New package: paperwork-2.2.2 idealist1508
` (12 preceding siblings ...)
2024-05-11 13:03 ` [PR REVIEW] " idealist1508
@ 2024-05-11 13:34 ` idealist1508
2024-05-11 19:19 ` abenson
` (10 subsequent siblings)
24 siblings, 0 replies; 26+ messages in thread
From: idealist1508 @ 2024-05-11 13:34 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 512 bytes --]
New review comment by idealist1508 on void-packages repository
https://github.com/void-linux/void-packages/pull/50265#discussion_r1597449926
Comment:
I have no idea why this line causes a build error on any architecture except x86_64 glibc and i686 glibc.
`/void-packages/srcpkgs/python3-pyocr/template: line 16: python: command not found
=> ERROR: python3-pyocr-0.8.5_1: do_build: 'python -m build --wheel --no-isolation' exited with 127
=> ERROR: in do_build() at srcpkgs/python3-pyocr/template:16
`
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PR REVIEW] New package: paperwork-2.2.2
2024-05-09 19:49 [PR PATCH] New package: paperwork-2.2.2 idealist1508
` (13 preceding siblings ...)
2024-05-11 13:34 ` idealist1508
@ 2024-05-11 19:19 ` abenson
2024-05-11 19:19 ` abenson
` (9 subsequent siblings)
24 siblings, 0 replies; 26+ messages in thread
From: abenson @ 2024-05-11 19:19 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 229 bytes --]
New review comment by abenson on void-packages repository
https://github.com/void-linux/void-packages/pull/50265#discussion_r1597495612
Comment:
```suggestion
build_style=python3-pep517
makedepends="python3-poetry-core"
```
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PR REVIEW] New package: paperwork-2.2.2
2024-05-09 19:49 [PR PATCH] New package: paperwork-2.2.2 idealist1508
` (14 preceding siblings ...)
2024-05-11 19:19 ` abenson
@ 2024-05-11 19:19 ` abenson
2024-05-11 19:19 ` abenson
` (8 subsequent siblings)
24 siblings, 0 replies; 26+ messages in thread
From: abenson @ 2024-05-11 19:19 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 194 bytes --]
New review comment by abenson on void-packages repository
https://github.com/void-linux/void-packages/pull/50265#discussion_r1597495612
Comment:
```suggestion
build_style=python3-pep517
```
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PR REVIEW] New package: paperwork-2.2.2
2024-05-09 19:49 [PR PATCH] New package: paperwork-2.2.2 idealist1508
` (15 preceding siblings ...)
2024-05-11 19:19 ` abenson
@ 2024-05-11 19:19 ` abenson
2024-05-11 19:21 ` abenson
` (7 subsequent siblings)
24 siblings, 0 replies; 26+ messages in thread
From: abenson @ 2024-05-11 19:19 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 201 bytes --]
New review comment by abenson on void-packages repository
https://github.com/void-linux/void-packages/pull/50265#discussion_r1597495673
Comment:
```suggestion
makedepends="python3-poetry-core"
```
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PR REVIEW] New package: paperwork-2.2.2
2024-05-09 19:49 [PR PATCH] New package: paperwork-2.2.2 idealist1508
` (16 preceding siblings ...)
2024-05-11 19:19 ` abenson
@ 2024-05-11 19:21 ` abenson
2024-05-11 19:21 ` abenson
` (6 subsequent siblings)
24 siblings, 0 replies; 26+ messages in thread
From: abenson @ 2024-05-11 19:21 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 201 bytes --]
New review comment by abenson on void-packages repository
https://github.com/void-linux/void-packages/pull/50265#discussion_r1597495673
Comment:
```suggestion
makedepends="python3-poetry-core"
```
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PR REVIEW] New package: paperwork-2.2.2
2024-05-09 19:49 [PR PATCH] New package: paperwork-2.2.2 idealist1508
` (17 preceding siblings ...)
2024-05-11 19:21 ` abenson
@ 2024-05-11 19:21 ` abenson
2024-05-14 19:45 ` [PR PATCH] [Updated] " idealist1508
` (5 subsequent siblings)
24 siblings, 0 replies; 26+ messages in thread
From: abenson @ 2024-05-11 19:21 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 194 bytes --]
New review comment by abenson on void-packages repository
https://github.com/void-linux/void-packages/pull/50265#discussion_r1597495612
Comment:
```suggestion
build_style=python3-pep517
```
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PR PATCH] [Updated] New package: paperwork-2.2.2
2024-05-09 19:49 [PR PATCH] New package: paperwork-2.2.2 idealist1508
` (18 preceding siblings ...)
2024-05-11 19:21 ` abenson
@ 2024-05-14 19:45 ` idealist1508
2024-05-14 19:47 ` [PR REVIEW] " idealist1508
` (4 subsequent siblings)
24 siblings, 0 replies; 26+ messages in thread
From: idealist1508 @ 2024-05-14 19:45 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1107 bytes --]
There is an updated pull request by idealist1508 against master on the void-packages repository
https://github.com/idealist1508/void-packages paperwork
https://github.com/void-linux/void-packages/pull/50265
New package: paperwork-2.2.2
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES**
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture, (x86_64-glibc)
A patch file from https://github.com/void-linux/void-packages/pull/50265.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-paperwork-50265.patch --]
[-- Type: text/x-diff, Size: 11906 bytes --]
From 253f4457dd1ea0b2413611af67ed16a7abe01e55 Mon Sep 17 00:00:00 2001
From: idealist1508 <id1508-github@yahoo.com>
Date: Fri, 10 May 2024 08:06:49 +0200
Subject: [PATCH 1/6] New package: python3-fabulous-0.4.0
---
srcpkgs/python3-fabulous/template | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
create mode 100644 srcpkgs/python3-fabulous/template
diff --git a/srcpkgs/python3-fabulous/template b/srcpkgs/python3-fabulous/template
new file mode 100644
index 00000000000000..3965bfcbd4b733
--- /dev/null
+++ b/srcpkgs/python3-fabulous/template
@@ -0,0 +1,16 @@
+# Template file for 'python3-fabulous'
+pkgname=python3-fabulous
+version=0.4.0
+revision=1
+build_style=python3-module
+hostmakedepends="python3-build python3-installer python3-setuptools_scm python3-wheel"
+short_desc="Print images, colors, and stylish text to the terminal with Python"
+maintainer="idealist1508 <id1508-github@yahoo.com>"
+license="Apache-2.0"
+homepage="https://github.com/jart/fabulous"
+distfiles="https://github.com/jart/${pkgname/python3-/}/archive/refs/tags/$version.tar.gz"
+checksum=867401a5fac139516b2d611e4800d1f7b63b81151c645ac5457d3b042c6ff406
+
+do_check() {
+ true
+}
From 45dff05a2b2b3d79c070234cf6bfd7366f46a635 Mon Sep 17 00:00:00 2001
From: idealist1508 <id1508-github@yahoo.com>
Date: Fri, 10 May 2024 08:10:14 +0200
Subject: [PATCH 2/6] New package: libinsane-1.0.10
---
srcpkgs/libinsane/template | 14 ++++++++++++++
1 file changed, 14 insertions(+)
create mode 100644 srcpkgs/libinsane/template
diff --git a/srcpkgs/libinsane/template b/srcpkgs/libinsane/template
new file mode 100644
index 00000000000000..0a7258c73bf0f3
--- /dev/null
+++ b/srcpkgs/libinsane/template
@@ -0,0 +1,14 @@
+# Template file for 'libinsane'
+pkgname=libinsane
+version=1.0.10
+revision=1
+build_style=gnu-makefile
+hostmakedepends="meson pkg-config gobject-introspection gtk-doc"
+makedepends="sane-devel vala-devel glib-devel "
+depends="sane"
+short_desc="Crossplatform library to access scanners"
+maintainer="idealist1508 <id1508-github@yahoo.com>"
+license="LGPL-3.0-or-later"
+homepage="https://gitlab.gnome.org/World/OpenPaperwork/libinsane"
+distfiles="https://gitlab.gnome.org/World/OpenPaperwork/$pkgname/-/archive/$version/$pkgname-$version.tar.gz"
+checksum=a9b8daaef03eb3bc4a8e638131e506ff3c2f99f715170da572e7f5ce7ba76467
From 993523d07b3b52fbb2bc4494d93ee9d631b0834c Mon Sep 17 00:00:00 2001
From: idealist1508 <id1508-github@yahoo.com>
Date: Fri, 10 May 2024 08:28:42 +0200
Subject: [PATCH 3/6] New package: python3-pyocr-0.8.5
---
srcpkgs/python3-pyocr/template | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
create mode 100644 srcpkgs/python3-pyocr/template
diff --git a/srcpkgs/python3-pyocr/template b/srcpkgs/python3-pyocr/template
new file mode 100644
index 00000000000000..c5abe15194c479
--- /dev/null
+++ b/srcpkgs/python3-pyocr/template
@@ -0,0 +1,21 @@
+# Template file for 'python3-pyocr'
+pkgname=python3-pyocr
+version=0.8.5
+revision=1
+build_style=python3-module
+hostmakedepends="python3-build python3-installer python3-setuptools_scm python3-wheel"
+depends="python3 tesseract-ocr"
+short_desc="Python wrapper for Tesseract and Cuneiform"
+maintainer="idealist1508 <id1508-github@yahoo.com>"
+license="GPL-3.0-or-later"
+homepage="https://gitlab.gnome.org/World/OpenPaperwork/pyocr"
+distfiles="https://gitlab.gnome.org/World/OpenPaperwork/pyocr/-/archive/${version}/pyocr-${version}.tar.bz2"
+checksum=ba9c63cfac7bb6e441590053954466b41768e6b87f1b279c2d62460cad8bb174
+
+do_build() {
+ python -m build --wheel --no-isolation
+}
+
+do_install() {
+ python -m installer --destdir="$DESTDIR" dist/*.whl
+}
From 0a381f17aeea645b4b0d446a0b37ac56efe52462 Mon Sep 17 00:00:00 2001
From: idealist1508 <id1508-github@yahoo.com>
Date: Fri, 10 May 2024 08:46:15 +0200
Subject: [PATCH 4/6] New package: libpillowfight-0.3.0
---
srcpkgs/libpillowfight/template | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
create mode 100644 srcpkgs/libpillowfight/template
diff --git a/srcpkgs/libpillowfight/template b/srcpkgs/libpillowfight/template
new file mode 100644
index 00000000000000..2ddecfd5edca6a
--- /dev/null
+++ b/srcpkgs/libpillowfight/template
@@ -0,0 +1,28 @@
+# Template file for 'libpillowfight'
+pkgname=libpillowfight
+version=0.3.0
+revision=1
+build_style=gnu-makefile
+hostmakedepends="cmake python3 python3-wheel python3-nose"
+makedepends="python3-setuptools_scm python3-devel"
+#depends="python3-Pillow"
+case $XBPS_TARGET_MACHINE in
+ x86_64*) depends+=" python3-pillow-simd" ;;
+ *) depends+=" python3-Pillow" ;;
+esac
+checkdepends="flake8"
+short_desc="Small library containing various image processing algorithms"
+maintainer="idealist1508 <id1508-github@yahoo.com>"
+license="GPL-2.0-only"
+homepage="https://gitlab.gnome.org/World/OpenPaperwork/libpillowfight"
+distfiles="https://gitlab.gnome.org/World/OpenPaperwork/libpillowfight/-/archive/${version}/libpillowfight-${version}.tar.bz2"
+checksum=0f39a6b0099bf246e961e30ddb9d3c19e8f9460ee24fbfa5c463cda196209327
+
+export CMAKE_OPTS="-DCMAKE_INSTALL_PREFIX=/usr"
+export PIP_ARGS="--root=/usr"
+
+pre_build() {
+ cat > src/pillowfight/_version.h <<- EOF || die
+ #define INTERNAL_PILLOWFIGHT_VERSION "$version"
+ EOF
+}
From 86a53d46947e108bedca163b0ce5eaa142979bd6 Mon Sep 17 00:00:00 2001
From: idealist1508 <id1508-github@yahoo.com>
Date: Fri, 10 May 2024 09:12:33 +0200
Subject: [PATCH 5/6] New package: python3-pillowfight-0.3.0
---
srcpkgs/python3-pillowfight/template | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
create mode 100644 srcpkgs/python3-pillowfight/template
diff --git a/srcpkgs/python3-pillowfight/template b/srcpkgs/python3-pillowfight/template
new file mode 100644
index 00000000000000..e1071d43169f5e
--- /dev/null
+++ b/srcpkgs/python3-pillowfight/template
@@ -0,0 +1,25 @@
+# Template file for 'python3-pillowfight'
+pkgname=python3-pillowfight
+version=0.3.0
+revision=1
+build_style=python3-module
+hostmakedepends="python3-nose"
+#makedepends="python3-devel"
+case $XBPS_TARGET_MACHINE in
+ x86_64*) depends+=" python3-pillow-simd" ;;
+ *) depends+=" python3-Pillow" ;;
+esac
+checkdepends="python3-Pillow"
+short_desc="Python bindings for libpillowfigh"
+maintainer="idealist1508 <id1508-github@yahoo.com>"
+license="GPL-3.0-or-later"
+homepage="https://gitlab.gnome.org/World/OpenPaperwork/libpillowfight"
+distfiles="https://gitlab.gnome.org/World/OpenPaperwork/libpillowfight/-/archive/${version}/libpillowfight-${version}.tar.bz2"
+checksum=0f39a6b0099bf246e961e30ddb9d3c19e8f9460ee24fbfa5c463cda196209327
+python_version=3
+
+pre_build() {
+ cat > src/pillowfight/_version.h <<- EOF || die
+ #define INTERNAL_PILLOWFIGHT_VERSION "$version"
+ EOF
+}
From e5a98c4dfa086512212a260468b183e0dee2ed7b Mon Sep 17 00:00:00 2001
From: idealist1508 <id1508-github@yahoo.com>
Date: Fri, 10 May 2024 09:14:47 +0200
Subject: [PATCH 6/6] New package: paperwork-2.2.2
---
.../paperwork/patches/Fix4Scipy1.13.0.patch | 55 +++++++++++++++++++
srcpkgs/paperwork/template | 44 +++++++++++++++
2 files changed, 99 insertions(+)
create mode 100644 srcpkgs/paperwork/patches/Fix4Scipy1.13.0.patch
create mode 100644 srcpkgs/paperwork/template
diff --git a/srcpkgs/paperwork/patches/Fix4Scipy1.13.0.patch b/srcpkgs/paperwork/patches/Fix4Scipy1.13.0.patch
new file mode 100644
index 00000000000000..9add28626a23a7
--- /dev/null
+++ b/srcpkgs/paperwork/patches/Fix4Scipy1.13.0.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/srcpkgs/paperwork/template b/srcpkgs/paperwork/template
new file mode 100644
index 00000000000000..de3e194bdf743b
--- /dev/null
+++ b/srcpkgs/paperwork/template
@@ -0,0 +1,44 @@
+# Template file for 'paperwork'
+pkgname=paperwork
+version=2.2.2
+revision=1
+short_desc="Personal document manager for scanned documents (and PDFs)"
+maintainer="idealist1508 <id1508-github@yahoo.com>"
+license="GPL-3.0-or-later"
+homepage="https://www.openpaper.work/"
+distfiles="https://gitlab.gnome.org/World/OpenPaperwork/paperwork/-/archive/${version}/paperwork-${version}.tar.bz2"
+checksum=006b4f95d9c5665dbcd0cdbd851f7164f0abc5fbf91138157f3768d9cae3ff51
+
+python_version=3
+hostmakedepends="gettext which python3-pillowfight python3-build python3-installer python3-setuptools_scm python3-wheel python3-distro python3-psutil python3-numpy python3-scipy python3-scikit-learn python3-pycountry python3-Whoosh python3-xdg python3-pyocr"
+depends="poppler-glib python3-distro python3-rich python3-psutil python3-pillowfight python3-gobject python3-numpy python3-scipy python3-scikit-learn python3-distutils-extra python3-pycountry python3-Whoosh python3-xdg python3-fabulous python3-pyocr"
+
+case $XBPS_TARGET_MACHINE in
+ x86_64*) depends+=" python3-pillow-simd" ;;
+ *) depends+=" python3-Pillow" ;;
+esac
+
+export SETUPTOOLS_SCM_PRETEND_VERSION=${version}
+
+do_build() {
+ make l10n_compile
+
+ for dir in openpaperwork-{core,gtk} paperwork-{backend,shell,gtk}; do
+ pushd $dir
+ python -m build --wheel --no-isolation
+ popd
+ done
+}
+
+do_install() {
+ for dir in openpaperwork-{core,gtk} paperwork-{backend,shell,gtk}; do
+ pushd $dir
+ python -m installer --destdir="$DESTDIR" dist/*.whl
+ popd
+ done
+
+ PYTHONPATH="$DESTDIR"$(python -c 'import site; print(site.getsitepackages()[0])') \
+ "$DESTDIR"/usr/bin/paperwork-gtk install \
+ --icon_base_dir="$DESTDIR/usr/share/icons" \
+ --data_base_dir="$DESTDIR/usr/share"
+}
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PR REVIEW] New package: paperwork-2.2.2
2024-05-09 19:49 [PR PATCH] New package: paperwork-2.2.2 idealist1508
` (19 preceding siblings ...)
2024-05-14 19:45 ` [PR PATCH] [Updated] " idealist1508
@ 2024-05-14 19:47 ` idealist1508
2024-05-14 19:58 ` [PR PATCH] [Updated] " idealist1508
` (3 subsequent siblings)
24 siblings, 0 replies; 26+ messages in thread
From: idealist1508 @ 2024-05-14 19:47 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 172 bytes --]
New review comment by idealist1508 on void-packages repository
https://github.com/void-linux/void-packages/pull/50265#discussion_r1600565390
Comment:
I found a solution.
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PR PATCH] [Updated] New package: paperwork-2.2.2
2024-05-09 19:49 [PR PATCH] New package: paperwork-2.2.2 idealist1508
` (20 preceding siblings ...)
2024-05-14 19:47 ` [PR REVIEW] " idealist1508
@ 2024-05-14 19:58 ` idealist1508
2024-05-24 15:04 ` idealist1508
` (2 subsequent siblings)
24 siblings, 0 replies; 26+ messages in thread
From: idealist1508 @ 2024-05-14 19:58 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1107 bytes --]
There is an updated pull request by idealist1508 against master on the void-packages repository
https://github.com/idealist1508/void-packages paperwork
https://github.com/void-linux/void-packages/pull/50265
New package: paperwork-2.2.2
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES**
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture, (x86_64-glibc)
A patch file from https://github.com/void-linux/void-packages/pull/50265.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-paperwork-50265.patch --]
[-- Type: text/x-diff, Size: 11877 bytes --]
From 253f4457dd1ea0b2413611af67ed16a7abe01e55 Mon Sep 17 00:00:00 2001
From: idealist1508 <id1508-github@yahoo.com>
Date: Fri, 10 May 2024 08:06:49 +0200
Subject: [PATCH 1/6] New package: python3-fabulous-0.4.0
---
srcpkgs/python3-fabulous/template | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
create mode 100644 srcpkgs/python3-fabulous/template
diff --git a/srcpkgs/python3-fabulous/template b/srcpkgs/python3-fabulous/template
new file mode 100644
index 00000000000000..3965bfcbd4b733
--- /dev/null
+++ b/srcpkgs/python3-fabulous/template
@@ -0,0 +1,16 @@
+# Template file for 'python3-fabulous'
+pkgname=python3-fabulous
+version=0.4.0
+revision=1
+build_style=python3-module
+hostmakedepends="python3-build python3-installer python3-setuptools_scm python3-wheel"
+short_desc="Print images, colors, and stylish text to the terminal with Python"
+maintainer="idealist1508 <id1508-github@yahoo.com>"
+license="Apache-2.0"
+homepage="https://github.com/jart/fabulous"
+distfiles="https://github.com/jart/${pkgname/python3-/}/archive/refs/tags/$version.tar.gz"
+checksum=867401a5fac139516b2d611e4800d1f7b63b81151c645ac5457d3b042c6ff406
+
+do_check() {
+ true
+}
From 45dff05a2b2b3d79c070234cf6bfd7366f46a635 Mon Sep 17 00:00:00 2001
From: idealist1508 <id1508-github@yahoo.com>
Date: Fri, 10 May 2024 08:10:14 +0200
Subject: [PATCH 2/6] New package: libinsane-1.0.10
---
srcpkgs/libinsane/template | 14 ++++++++++++++
1 file changed, 14 insertions(+)
create mode 100644 srcpkgs/libinsane/template
diff --git a/srcpkgs/libinsane/template b/srcpkgs/libinsane/template
new file mode 100644
index 00000000000000..0a7258c73bf0f3
--- /dev/null
+++ b/srcpkgs/libinsane/template
@@ -0,0 +1,14 @@
+# Template file for 'libinsane'
+pkgname=libinsane
+version=1.0.10
+revision=1
+build_style=gnu-makefile
+hostmakedepends="meson pkg-config gobject-introspection gtk-doc"
+makedepends="sane-devel vala-devel glib-devel "
+depends="sane"
+short_desc="Crossplatform library to access scanners"
+maintainer="idealist1508 <id1508-github@yahoo.com>"
+license="LGPL-3.0-or-later"
+homepage="https://gitlab.gnome.org/World/OpenPaperwork/libinsane"
+distfiles="https://gitlab.gnome.org/World/OpenPaperwork/$pkgname/-/archive/$version/$pkgname-$version.tar.gz"
+checksum=a9b8daaef03eb3bc4a8e638131e506ff3c2f99f715170da572e7f5ce7ba76467
From 993523d07b3b52fbb2bc4494d93ee9d631b0834c Mon Sep 17 00:00:00 2001
From: idealist1508 <id1508-github@yahoo.com>
Date: Fri, 10 May 2024 08:28:42 +0200
Subject: [PATCH 3/6] New package: python3-pyocr-0.8.5
---
srcpkgs/python3-pyocr/template | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
create mode 100644 srcpkgs/python3-pyocr/template
diff --git a/srcpkgs/python3-pyocr/template b/srcpkgs/python3-pyocr/template
new file mode 100644
index 00000000000000..c5abe15194c479
--- /dev/null
+++ b/srcpkgs/python3-pyocr/template
@@ -0,0 +1,21 @@
+# Template file for 'python3-pyocr'
+pkgname=python3-pyocr
+version=0.8.5
+revision=1
+build_style=python3-module
+hostmakedepends="python3-build python3-installer python3-setuptools_scm python3-wheel"
+depends="python3 tesseract-ocr"
+short_desc="Python wrapper for Tesseract and Cuneiform"
+maintainer="idealist1508 <id1508-github@yahoo.com>"
+license="GPL-3.0-or-later"
+homepage="https://gitlab.gnome.org/World/OpenPaperwork/pyocr"
+distfiles="https://gitlab.gnome.org/World/OpenPaperwork/pyocr/-/archive/${version}/pyocr-${version}.tar.bz2"
+checksum=ba9c63cfac7bb6e441590053954466b41768e6b87f1b279c2d62460cad8bb174
+
+do_build() {
+ python -m build --wheel --no-isolation
+}
+
+do_install() {
+ python -m installer --destdir="$DESTDIR" dist/*.whl
+}
From 7b901ae693102dac6968ba9ec4419795b0cf5470 Mon Sep 17 00:00:00 2001
From: idealist1508 <id1508-github@yahoo.com>
Date: Fri, 10 May 2024 08:46:15 +0200
Subject: [PATCH 4/6] New package: libpillowfight-0.3.0
---
srcpkgs/libpillowfight/template | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
create mode 100644 srcpkgs/libpillowfight/template
diff --git a/srcpkgs/libpillowfight/template b/srcpkgs/libpillowfight/template
new file mode 100644
index 00000000000000..8cb48afb447dd7
--- /dev/null
+++ b/srcpkgs/libpillowfight/template
@@ -0,0 +1,27 @@
+# Template file for 'libpillowfight'
+pkgname=libpillowfight
+version=0.3.0
+revision=1
+build_style=gnu-makefile
+hostmakedepends="cmake python3 python3-wheel python3-nose"
+makedepends="python3-setuptools_scm python3-devel"
+case $XBPS_TARGET_MACHINE in
+ x86_64*) depends+=" python3-pillow-simd" ;;
+ *) depends+=" python3-Pillow" ;;
+esac
+checkdepends="flake8"
+short_desc="Small library containing various image processing algorithms"
+maintainer="idealist1508 <id1508-github@yahoo.com>"
+license="GPL-2.0-only"
+homepage="https://gitlab.gnome.org/World/OpenPaperwork/libpillowfight"
+distfiles="https://gitlab.gnome.org/World/OpenPaperwork/libpillowfight/-/archive/${version}/libpillowfight-${version}.tar.bz2"
+checksum=0f39a6b0099bf246e961e30ddb9d3c19e8f9460ee24fbfa5c463cda196209327
+
+export CMAKE_OPTS="-DCMAKE_INSTALL_PREFIX=/usr"
+export PIP_ARGS="--root=/usr"
+
+pre_build() {
+ cat > src/pillowfight/_version.h <<- EOF || die
+ #define INTERNAL_PILLOWFIGHT_VERSION "$version"
+ EOF
+}
From cfcafbafd7294756231f54184e5d6c67ac6f11d8 Mon Sep 17 00:00:00 2001
From: idealist1508 <id1508-github@yahoo.com>
Date: Fri, 10 May 2024 09:12:33 +0200
Subject: [PATCH 5/6] New package: python3-pillowfight-0.3.0
---
srcpkgs/python3-pillowfight/template | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
create mode 100644 srcpkgs/python3-pillowfight/template
diff --git a/srcpkgs/python3-pillowfight/template b/srcpkgs/python3-pillowfight/template
new file mode 100644
index 00000000000000..e67ac266ae3adf
--- /dev/null
+++ b/srcpkgs/python3-pillowfight/template
@@ -0,0 +1,25 @@
+# Template file for 'python3-pillowfight'
+pkgname=python3-pillowfight
+version=0.3.0
+revision=1
+build_style=python3-module
+hostmakedepends="python3-nose"
+makedepends="python3-devel"
+case $XBPS_TARGET_MACHINE in
+ x86_64*) depends+=" python3-pillow-simd" ;;
+ *) depends+=" python3-Pillow" ;;
+esac
+checkdepends="python3-Pillow"
+short_desc="Python bindings for libpillowfigh"
+maintainer="idealist1508 <id1508-github@yahoo.com>"
+license="GPL-3.0-or-later"
+homepage="https://gitlab.gnome.org/World/OpenPaperwork/libpillowfight"
+distfiles="https://gitlab.gnome.org/World/OpenPaperwork/libpillowfight/-/archive/${version}/libpillowfight-${version}.tar.bz2"
+checksum=0f39a6b0099bf246e961e30ddb9d3c19e8f9460ee24fbfa5c463cda196209327
+python_version=3
+
+pre_build() {
+ cat > src/pillowfight/_version.h <<- EOF || die
+ #define INTERNAL_PILLOWFIGHT_VERSION "$version"
+ EOF
+}
From 62ed60a9a6ade19eedacdaca73883b22f867d8d9 Mon Sep 17 00:00:00 2001
From: idealist1508 <id1508-github@yahoo.com>
Date: Fri, 10 May 2024 09:14:47 +0200
Subject: [PATCH 6/6] New package: paperwork-2.2.2
---
.../paperwork/patches/Fix4Scipy1.13.0.patch | 55 +++++++++++++++++++
srcpkgs/paperwork/template | 44 +++++++++++++++
2 files changed, 99 insertions(+)
create mode 100644 srcpkgs/paperwork/patches/Fix4Scipy1.13.0.patch
create mode 100644 srcpkgs/paperwork/template
diff --git a/srcpkgs/paperwork/patches/Fix4Scipy1.13.0.patch b/srcpkgs/paperwork/patches/Fix4Scipy1.13.0.patch
new file mode 100644
index 00000000000000..9add28626a23a7
--- /dev/null
+++ b/srcpkgs/paperwork/patches/Fix4Scipy1.13.0.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/srcpkgs/paperwork/template b/srcpkgs/paperwork/template
new file mode 100644
index 00000000000000..de3e194bdf743b
--- /dev/null
+++ b/srcpkgs/paperwork/template
@@ -0,0 +1,44 @@
+# Template file for 'paperwork'
+pkgname=paperwork
+version=2.2.2
+revision=1
+short_desc="Personal document manager for scanned documents (and PDFs)"
+maintainer="idealist1508 <id1508-github@yahoo.com>"
+license="GPL-3.0-or-later"
+homepage="https://www.openpaper.work/"
+distfiles="https://gitlab.gnome.org/World/OpenPaperwork/paperwork/-/archive/${version}/paperwork-${version}.tar.bz2"
+checksum=006b4f95d9c5665dbcd0cdbd851f7164f0abc5fbf91138157f3768d9cae3ff51
+
+python_version=3
+hostmakedepends="gettext which python3-pillowfight python3-build python3-installer python3-setuptools_scm python3-wheel python3-distro python3-psutil python3-numpy python3-scipy python3-scikit-learn python3-pycountry python3-Whoosh python3-xdg python3-pyocr"
+depends="poppler-glib python3-distro python3-rich python3-psutil python3-pillowfight python3-gobject python3-numpy python3-scipy python3-scikit-learn python3-distutils-extra python3-pycountry python3-Whoosh python3-xdg python3-fabulous python3-pyocr"
+
+case $XBPS_TARGET_MACHINE in
+ x86_64*) depends+=" python3-pillow-simd" ;;
+ *) depends+=" python3-Pillow" ;;
+esac
+
+export SETUPTOOLS_SCM_PRETEND_VERSION=${version}
+
+do_build() {
+ make l10n_compile
+
+ for dir in openpaperwork-{core,gtk} paperwork-{backend,shell,gtk}; do
+ pushd $dir
+ python -m build --wheel --no-isolation
+ popd
+ done
+}
+
+do_install() {
+ for dir in openpaperwork-{core,gtk} paperwork-{backend,shell,gtk}; do
+ pushd $dir
+ python -m installer --destdir="$DESTDIR" dist/*.whl
+ popd
+ done
+
+ PYTHONPATH="$DESTDIR"$(python -c 'import site; print(site.getsitepackages()[0])') \
+ "$DESTDIR"/usr/bin/paperwork-gtk install \
+ --icon_base_dir="$DESTDIR/usr/share/icons" \
+ --data_base_dir="$DESTDIR/usr/share"
+}
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PR PATCH] [Updated] New package: paperwork-2.2.2
2024-05-09 19:49 [PR PATCH] New package: paperwork-2.2.2 idealist1508
` (21 preceding siblings ...)
2024-05-14 19:58 ` [PR PATCH] [Updated] " idealist1508
@ 2024-05-24 15:04 ` idealist1508
2024-08-23 1:52 ` github-actions
2024-09-06 1:55 ` [PR PATCH] [Closed]: " github-actions
24 siblings, 0 replies; 26+ messages in thread
From: idealist1508 @ 2024-05-24 15:04 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1107 bytes --]
There is an updated pull request by idealist1508 against master on the void-packages repository
https://github.com/idealist1508/void-packages paperwork
https://github.com/void-linux/void-packages/pull/50265
New package: paperwork-2.2.2
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES**
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture, (x86_64-glibc)
A patch file from https://github.com/void-linux/void-packages/pull/50265.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-paperwork-50265.patch --]
[-- Type: text/x-diff, Size: 11887 bytes --]
From 253f4457dd1ea0b2413611af67ed16a7abe01e55 Mon Sep 17 00:00:00 2001
From: idealist1508 <id1508-github@yahoo.com>
Date: Fri, 10 May 2024 08:06:49 +0200
Subject: [PATCH 1/6] New package: python3-fabulous-0.4.0
---
srcpkgs/python3-fabulous/template | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
create mode 100644 srcpkgs/python3-fabulous/template
diff --git a/srcpkgs/python3-fabulous/template b/srcpkgs/python3-fabulous/template
new file mode 100644
index 00000000000000..3965bfcbd4b733
--- /dev/null
+++ b/srcpkgs/python3-fabulous/template
@@ -0,0 +1,16 @@
+# Template file for 'python3-fabulous'
+pkgname=python3-fabulous
+version=0.4.0
+revision=1
+build_style=python3-module
+hostmakedepends="python3-build python3-installer python3-setuptools_scm python3-wheel"
+short_desc="Print images, colors, and stylish text to the terminal with Python"
+maintainer="idealist1508 <id1508-github@yahoo.com>"
+license="Apache-2.0"
+homepage="https://github.com/jart/fabulous"
+distfiles="https://github.com/jart/${pkgname/python3-/}/archive/refs/tags/$version.tar.gz"
+checksum=867401a5fac139516b2d611e4800d1f7b63b81151c645ac5457d3b042c6ff406
+
+do_check() {
+ true
+}
From 45dff05a2b2b3d79c070234cf6bfd7366f46a635 Mon Sep 17 00:00:00 2001
From: idealist1508 <id1508-github@yahoo.com>
Date: Fri, 10 May 2024 08:10:14 +0200
Subject: [PATCH 2/6] New package: libinsane-1.0.10
---
srcpkgs/libinsane/template | 14 ++++++++++++++
1 file changed, 14 insertions(+)
create mode 100644 srcpkgs/libinsane/template
diff --git a/srcpkgs/libinsane/template b/srcpkgs/libinsane/template
new file mode 100644
index 00000000000000..0a7258c73bf0f3
--- /dev/null
+++ b/srcpkgs/libinsane/template
@@ -0,0 +1,14 @@
+# Template file for 'libinsane'
+pkgname=libinsane
+version=1.0.10
+revision=1
+build_style=gnu-makefile
+hostmakedepends="meson pkg-config gobject-introspection gtk-doc"
+makedepends="sane-devel vala-devel glib-devel "
+depends="sane"
+short_desc="Crossplatform library to access scanners"
+maintainer="idealist1508 <id1508-github@yahoo.com>"
+license="LGPL-3.0-or-later"
+homepage="https://gitlab.gnome.org/World/OpenPaperwork/libinsane"
+distfiles="https://gitlab.gnome.org/World/OpenPaperwork/$pkgname/-/archive/$version/$pkgname-$version.tar.gz"
+checksum=a9b8daaef03eb3bc4a8e638131e506ff3c2f99f715170da572e7f5ce7ba76467
From 993523d07b3b52fbb2bc4494d93ee9d631b0834c Mon Sep 17 00:00:00 2001
From: idealist1508 <id1508-github@yahoo.com>
Date: Fri, 10 May 2024 08:28:42 +0200
Subject: [PATCH 3/6] New package: python3-pyocr-0.8.5
---
srcpkgs/python3-pyocr/template | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
create mode 100644 srcpkgs/python3-pyocr/template
diff --git a/srcpkgs/python3-pyocr/template b/srcpkgs/python3-pyocr/template
new file mode 100644
index 00000000000000..c5abe15194c479
--- /dev/null
+++ b/srcpkgs/python3-pyocr/template
@@ -0,0 +1,21 @@
+# Template file for 'python3-pyocr'
+pkgname=python3-pyocr
+version=0.8.5
+revision=1
+build_style=python3-module
+hostmakedepends="python3-build python3-installer python3-setuptools_scm python3-wheel"
+depends="python3 tesseract-ocr"
+short_desc="Python wrapper for Tesseract and Cuneiform"
+maintainer="idealist1508 <id1508-github@yahoo.com>"
+license="GPL-3.0-or-later"
+homepage="https://gitlab.gnome.org/World/OpenPaperwork/pyocr"
+distfiles="https://gitlab.gnome.org/World/OpenPaperwork/pyocr/-/archive/${version}/pyocr-${version}.tar.bz2"
+checksum=ba9c63cfac7bb6e441590053954466b41768e6b87f1b279c2d62460cad8bb174
+
+do_build() {
+ python -m build --wheel --no-isolation
+}
+
+do_install() {
+ python -m installer --destdir="$DESTDIR" dist/*.whl
+}
From 7b901ae693102dac6968ba9ec4419795b0cf5470 Mon Sep 17 00:00:00 2001
From: idealist1508 <id1508-github@yahoo.com>
Date: Fri, 10 May 2024 08:46:15 +0200
Subject: [PATCH 4/6] New package: libpillowfight-0.3.0
---
srcpkgs/libpillowfight/template | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
create mode 100644 srcpkgs/libpillowfight/template
diff --git a/srcpkgs/libpillowfight/template b/srcpkgs/libpillowfight/template
new file mode 100644
index 00000000000000..8cb48afb447dd7
--- /dev/null
+++ b/srcpkgs/libpillowfight/template
@@ -0,0 +1,27 @@
+# Template file for 'libpillowfight'
+pkgname=libpillowfight
+version=0.3.0
+revision=1
+build_style=gnu-makefile
+hostmakedepends="cmake python3 python3-wheel python3-nose"
+makedepends="python3-setuptools_scm python3-devel"
+case $XBPS_TARGET_MACHINE in
+ x86_64*) depends+=" python3-pillow-simd" ;;
+ *) depends+=" python3-Pillow" ;;
+esac
+checkdepends="flake8"
+short_desc="Small library containing various image processing algorithms"
+maintainer="idealist1508 <id1508-github@yahoo.com>"
+license="GPL-2.0-only"
+homepage="https://gitlab.gnome.org/World/OpenPaperwork/libpillowfight"
+distfiles="https://gitlab.gnome.org/World/OpenPaperwork/libpillowfight/-/archive/${version}/libpillowfight-${version}.tar.bz2"
+checksum=0f39a6b0099bf246e961e30ddb9d3c19e8f9460ee24fbfa5c463cda196209327
+
+export CMAKE_OPTS="-DCMAKE_INSTALL_PREFIX=/usr"
+export PIP_ARGS="--root=/usr"
+
+pre_build() {
+ cat > src/pillowfight/_version.h <<- EOF || die
+ #define INTERNAL_PILLOWFIGHT_VERSION "$version"
+ EOF
+}
From cfcafbafd7294756231f54184e5d6c67ac6f11d8 Mon Sep 17 00:00:00 2001
From: idealist1508 <id1508-github@yahoo.com>
Date: Fri, 10 May 2024 09:12:33 +0200
Subject: [PATCH 5/6] New package: python3-pillowfight-0.3.0
---
srcpkgs/python3-pillowfight/template | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
create mode 100644 srcpkgs/python3-pillowfight/template
diff --git a/srcpkgs/python3-pillowfight/template b/srcpkgs/python3-pillowfight/template
new file mode 100644
index 00000000000000..e67ac266ae3adf
--- /dev/null
+++ b/srcpkgs/python3-pillowfight/template
@@ -0,0 +1,25 @@
+# Template file for 'python3-pillowfight'
+pkgname=python3-pillowfight
+version=0.3.0
+revision=1
+build_style=python3-module
+hostmakedepends="python3-nose"
+makedepends="python3-devel"
+case $XBPS_TARGET_MACHINE in
+ x86_64*) depends+=" python3-pillow-simd" ;;
+ *) depends+=" python3-Pillow" ;;
+esac
+checkdepends="python3-Pillow"
+short_desc="Python bindings for libpillowfigh"
+maintainer="idealist1508 <id1508-github@yahoo.com>"
+license="GPL-3.0-or-later"
+homepage="https://gitlab.gnome.org/World/OpenPaperwork/libpillowfight"
+distfiles="https://gitlab.gnome.org/World/OpenPaperwork/libpillowfight/-/archive/${version}/libpillowfight-${version}.tar.bz2"
+checksum=0f39a6b0099bf246e961e30ddb9d3c19e8f9460ee24fbfa5c463cda196209327
+python_version=3
+
+pre_build() {
+ cat > src/pillowfight/_version.h <<- EOF || die
+ #define INTERNAL_PILLOWFIGHT_VERSION "$version"
+ EOF
+}
From 8c7683493f84afade5d1f0b130889bd0b0bc262f Mon Sep 17 00:00:00 2001
From: idealist1508 <id1508-github@yahoo.com>
Date: Fri, 10 May 2024 09:14:47 +0200
Subject: [PATCH 6/6] New package: paperwork-2.2.2
---
.../paperwork/patches/Fix4Scipy1.13.0.patch | 55 +++++++++++++++++++
srcpkgs/paperwork/template | 44 +++++++++++++++
2 files changed, 99 insertions(+)
create mode 100644 srcpkgs/paperwork/patches/Fix4Scipy1.13.0.patch
create mode 100644 srcpkgs/paperwork/template
diff --git a/srcpkgs/paperwork/patches/Fix4Scipy1.13.0.patch b/srcpkgs/paperwork/patches/Fix4Scipy1.13.0.patch
new file mode 100644
index 00000000000000..9add28626a23a7
--- /dev/null
+++ b/srcpkgs/paperwork/patches/Fix4Scipy1.13.0.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/srcpkgs/paperwork/template b/srcpkgs/paperwork/template
new file mode 100644
index 00000000000000..f5df4a5b884183
--- /dev/null
+++ b/srcpkgs/paperwork/template
@@ -0,0 +1,44 @@
+# Template file for 'paperwork'
+pkgname=paperwork
+version=2.2.2
+revision=1
+short_desc="Personal document manager for scanned documents (and PDFs)"
+maintainer="idealist1508 <id1508-github@yahoo.com>"
+license="GPL-3.0-or-later"
+homepage="https://www.openpaper.work/"
+distfiles="https://gitlab.gnome.org/World/OpenPaperwork/paperwork/-/archive/${version}/paperwork-${version}.tar.bz2"
+checksum=006b4f95d9c5665dbcd0cdbd851f7164f0abc5fbf91138157f3768d9cae3ff51
+
+python_version=3
+hostmakedepends="gettext which python3-pillowfight python3-build python3-installer python3-setuptools_scm python3-wheel python3-distro python3-psutil python3-numpy python3-scipy python3-scikit-learn python3-pycountry python3-Whoosh python3-xdg python3-pyocr"
+depends="libhandy1 poppler-glib python3-distro python3-rich python3-psutil python3-pillowfight python3-gobject python3-numpy python3-scipy python3-scikit-learn python3-distutils-extra python3-pycountry python3-Whoosh python3-xdg python3-fabulous python3-pyocr"
+
+case $XBPS_TARGET_MACHINE in
+ x86_64*) depends+=" python3-pillow-simd" ;;
+ *) depends+=" python3-Pillow" ;;
+esac
+
+export SETUPTOOLS_SCM_PRETEND_VERSION=${version}
+
+do_build() {
+ make l10n_compile
+
+ for dir in openpaperwork-{core,gtk} paperwork-{backend,shell,gtk}; do
+ pushd $dir
+ python -m build --wheel --no-isolation
+ popd
+ done
+}
+
+do_install() {
+ for dir in openpaperwork-{core,gtk} paperwork-{backend,shell,gtk}; do
+ pushd $dir
+ python -m installer --destdir="$DESTDIR" dist/*.whl
+ popd
+ done
+
+ PYTHONPATH="$DESTDIR"$(python -c 'import site; print(site.getsitepackages()[0])') \
+ "$DESTDIR"/usr/bin/paperwork-gtk install \
+ --icon_base_dir="$DESTDIR/usr/share/icons" \
+ --data_base_dir="$DESTDIR/usr/share"
+}
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: New package: paperwork-2.2.2
2024-05-09 19:49 [PR PATCH] New package: paperwork-2.2.2 idealist1508
` (22 preceding siblings ...)
2024-05-24 15:04 ` idealist1508
@ 2024-08-23 1:52 ` github-actions
2024-09-06 1:55 ` [PR PATCH] [Closed]: " github-actions
24 siblings, 0 replies; 26+ messages in thread
From: github-actions @ 2024-08-23 1:52 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 305 bytes --]
New comment by github-actions[bot] on void-packages repository
https://github.com/void-linux/void-packages/pull/50265#issuecomment-2306029813
Comment:
Pull Requests become stale 90 days after last activity and are closed 14 days after that. If this pull request is still relevant bump it or assign it.
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PR PATCH] [Closed]: New package: paperwork-2.2.2
2024-05-09 19:49 [PR PATCH] New package: paperwork-2.2.2 idealist1508
` (23 preceding siblings ...)
2024-08-23 1:52 ` github-actions
@ 2024-09-06 1:55 ` github-actions
24 siblings, 0 replies; 26+ messages in thread
From: github-actions @ 2024-09-06 1:55 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 939 bytes --]
There's a closed pull request on the void-packages repository
New package: paperwork-2.2.2
https://github.com/void-linux/void-packages/pull/50265
Description:
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES**
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**
<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
#### Local build testing
- I built this PR locally for my native architecture, (x86_64-glibc)
^ permalink raw reply [flat|nested] 26+ messages in thread
end of thread, other threads:[~2024-09-06 1:55 UTC | newest]
Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-09 19:49 [PR PATCH] New package: paperwork-2.2.2 idealist1508
2024-05-10 1:49 ` abenson
2024-05-10 1:49 ` [PR REVIEW] " abenson
2024-05-10 1:49 ` abenson
2024-05-10 1:51 ` abenson
2024-05-10 1:51 ` abenson
2024-05-10 1:51 ` abenson
2024-05-10 7:25 ` [PR PATCH] [Updated] " idealist1508
2024-05-10 7:28 ` idealist1508
2024-05-11 3:03 ` [PR REVIEW] " abenson
2024-05-11 3:06 ` abenson
2024-05-11 12:56 ` [PR PATCH] [Updated] " idealist1508
2024-05-11 13:01 ` idealist1508
2024-05-11 13:03 ` [PR REVIEW] " idealist1508
2024-05-11 13:34 ` idealist1508
2024-05-11 19:19 ` abenson
2024-05-11 19:19 ` abenson
2024-05-11 19:19 ` abenson
2024-05-11 19:21 ` abenson
2024-05-11 19:21 ` abenson
2024-05-14 19:45 ` [PR PATCH] [Updated] " idealist1508
2024-05-14 19:47 ` [PR REVIEW] " idealist1508
2024-05-14 19:58 ` [PR PATCH] [Updated] " idealist1508
2024-05-24 15:04 ` idealist1508
2024-08-23 1:52 ` github-actions
2024-09-06 1:55 ` [PR PATCH] [Closed]: " github-actions
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).