Package Details: manga-ocr-git 0.1.11.r0.g1a3ffca-2

Git Clone URL: https://aur.archlinux.org/manga-ocr-git.git (read-only, click to copy)
Package Base: manga-ocr-git
Description: Optical character recognition for Japanese text focused on manga
Upstream URL: https://github.com/kha-white/manga-ocr
Keywords: ocr
Licenses: Apache-2.0
Conflicts: manga-ocr
Provides: manga-ocr
Submitter: atticf
Maintainer: atticf
Last Packager: atticf
Votes: 0
Popularity: 0.000000
First Submitted: 2023-01-23 08:56 (UTC)
Last Updated: 2024-05-13 06:31 (UTC)

Latest Comments

utku.helvaci commented on 2024-10-14 16:31 (UTC) (edited on 2024-11-02 16:38 (UTC) by utku.helvaci)

Builds if you install fugashi via pip: pip3 install --break-system-packages --user fugashi Edit: fixed ln -s to ln -sf


diff -urN manga-ocr-git/PKGBUILD manga-ocr-git/PKGBUILD
--- manga-ocr-git/PKGBUILD  2024-10-14 19:13:36.552892527 +0300
+++ manga-ocr-git/PKGBUILD  2024-10-14 19:10:17.588838337 +0300
@@ -1,3 +1,4 @@
+# Contributor: Utku Helvacı <utku.helvaci.tux@gmail.com>
 # Maintainer: Attila Fidan <archlinux-buildsystem@print0.net>

 pkgname=manga-ocr-git
@@ -39,13 +40,16 @@
 source=(
   "git+$url.git#branch=master"
   "skip-example-run-on-boot.patch"
+  "setup.py"
 )
 b2sums=('SKIP'
-        '80d608d0c474839113cf36f35a2984f819e4a62cb5a2e4915cb9798461a14772ddbfa4ebf4a633047393eadaae9c8106850d7c1e4ad6356f02c8be101a288195')
+        '056851b1735512cb4bc138dbc74e9558ba573829ac23db4b3b91c8adf04afef10a7409d7d9d80c3169700f5c51be8a54d9ec9bd1a0226a53c51ed90bdd251d96'
+        '9a225b6b6fcd800c2368f5d654c5425f6871cf8ee02dba436276d8f2e65df471a5b2726335cf60449aa42d14993163906db01b055c6a31c3a96d65cbe171e138')

 prepare() {
   cd "$_gitname"
   patch --forward --strip=0 --input=../skip-example-run-on-boot.patch
+  ln -sf ../setup.py .
 }

 pkgver(){
diff -urN manga-ocr-git/setup.py manga-ocr-git/setup.py
--- manga-ocr-git/setup.py  1970-01-01 02:00:00.000000000 +0200
+++ manga-ocr-git/setup.py  2024-10-14 18:58:52.000000000 +0300
@@ -0,0 +1,6 @@
+#!/usr/bin/env python
+
+import setuptools
+
+if __name__ == "__main__":
+    setuptools.setup()
diff -urN manga-ocr-git/skip-example-run-on-boot.patch manga-ocr-git/skip-example-run-on-boot.patch
--- manga-ocr-git/skip-example-run-on-boot.patch    2024-10-14 19:13:36.552892527 +0300
+++ manga-ocr-git/skip-example-run-on-boot.patch    2024-10-14 18:53:23.000000000 +0300
@@ -1,14 +1,14 @@
---- manga_ocr/ocr.py   2023-01-22 09:41:16.542263593 +1100
-+++ manga_ocr/ocr.py-patched   2023-01-22 09:41:26.878835597 +1100
-@@ -21,11 +21,6 @@
+--- manga_ocr/ocr.py   2024-10-14 18:46:06.521019393 +0300
++++ manga_ocr/ocr.py   2024-10-14 18:49:06.075481230 +0300
+@@ -27,11 +27,6 @@
          else:
-             logger.info('Using CPU')
+             logger.info("Using CPU")

--        example_path = Path(__file__).parent / 'assets/example.jpg'
+-        example_path = Path(__file__).parent / "assets/example.jpg"
 -        if not example_path.is_file():
--            example_path = Path(__file__).parent.parent / 'assets/example.jpg'
+-            raise FileNotFoundError(f"Missing example image {example_path}")
 -        self(example_path)
 -
-         logger.info('OCR ready')
+         logger.info("OCR ready")

      def __call__(self, img_or_path):

atticf commented on 2024-05-13 06:40 (UTC)

Sorry, I'm back.

I never had an issue building safetensors in a clean chroot. I forgot to commit a patch from my internal systems that skips invoking an example run on boot on an image that isn't packaged which would fail. I'm very sorry.

Beebo commented on 2023-12-23 16:32 (UTC)

I resolved the issue compiling the python-safetensors dependency by running the following:

rustup install stable
rustup default stable

After doing this, the manga-ocr-git package installs successfully.

Beebo commented on 2023-12-22 22:59 (UTC)

Doesn't seem to build correctly on my machine, missing dep?

Running `maturin pep517 build-wheel -i /usr/bin/python --compatibility off`
error: rustup could not choose a version of cargo to run, because one wasn't specified explicitly, and no default is configured.
help: run 'rustup default stable' to download the latest stable release of Rust and set it as your default toolchain.
💥 maturin failed
  Caused by: Cargo metadata failed. Does your crate compile with `cargo build`?
  Caused by: `cargo metadata` exited with an error: 
Error: command ['maturin', 'pep517', 'build-wheel', '-i', '/usr/bin/python', '--compatibility', 'off'] returned non-zero exit status 1

ERROR Backend subprocess exited when trying to invoke build_wheel
==> ERROR: A failure occurred in build().
    Aborting...
 -> error making: python-safetensors-exit status 4
==> Making package: python-transformers 4.36.2-1 (Fri 22 Dec 2023 05:58:32 PM EST)
==> Checking runtime dependencies...
error: could not open file /var/lib/pacman/local/libsass-3.6.5-3/desc: No such file or directory
==> Missing dependencies:
  -> python-safetensors
==> Checking buildtime dependencies...
==> ERROR: Could not resolve all dependencies.
 -> error making: python-transformers-exit status 8
==> Making package: manga-ocr-git 0.1.8.r0.g250b89f-1 (Fri 22 Dec 2023 05:58:32 PM EST)
==> Checking runtime dependencies...
==> Missing dependencies:
  -> python-transformers>=4.12.5
==> Checking buildtime dependencies...
==> ERROR: Could not resolve all dependencies.
 -> error making: manga-ocr-git-exit status 8
 -> Failed to install the following packages. Manual intervention is required:
python-safetensors - exit status 4
python-transformers - exit status 8
manga-ocr-git - exit status 8