Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move example.jpg inside manga_ocr package #58

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vaxr
Copy link

@vaxr vaxr commented Jan 9, 2024

Fixes #43

Summary

Move assets/example.jpg to manga_ocr/assets/example.jpg, so it can be distributed by setuptools.

Motivation

After installing the manga-ocr-git AUR package on Arch Linux and running the binary, it crashes because it cannot find assets/example.jpg. The linked issue describes a similar experience.

Rationale

  • The AUR package uses setup.py install --root to install manga_ocr to the system. The example.jpg file is indeed not included.
  • assets/example.jpg is included in MANIFEST.in, but setuptools ignores it, because the assets/ directory is not inside any package configured in setup.py.
  • Explored how to include the file without moving it out of assets/ under project root, but haven't found any good solution: The only option I am aware of would be: package_data={ 'manga_ocr': ['../assets/example.jpg'] }. The problem with that is it distributes the assets/ dir right into site-packages/ root, and not under the package namespace.
  • example.jpg isn't used anywhere else in the project, so hopefully moving it under manga_ocr/ should be fine.
  • Tested manually with local build and pointing AUR at my repo, both work fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MangaOcr tries to load an example for some reason
1 participant