Github messages for voidlinux
 help / color / mirror / Atom feed
From: idealist1508 <idealist1508@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] New package: paperwork-2.2.2
Date: Sat, 11 May 2024 14:56:14 +0200	[thread overview]
Message-ID: <20240511125614.D540E26BCD@inbox.vuxu.org> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-50265@inbox.vuxu.org>

[-- 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"
+}

  parent reply	other threads:[~2024-05-11 12:56 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-09 19:49 [PR PATCH] " 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 ` idealist1508 [this message]
2024-05-11 13:01 ` [PR PATCH] [Updated] " 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240511125614.D540E26BCD@inbox.vuxu.org \
    --to=idealist1508@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).