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

ocrmypdf: 9.2.0 -> 9.5.0 #77494

Merged
merged 4 commits into from Jan 22, 2020
Merged

ocrmypdf: 9.2.0 -> 9.5.0 #77494

merged 4 commits into from Jan 22, 2020

Conversation

dtzWill
Copy link
Member

@dtzWill dtzWill commented Jan 11, 2020

Motivation for this change

https://ocrmypdf.readthedocs.io/en/latest/release_notes.html#v9-4-0
https://ocrmypdf.readthedocs.io/en/latest/release_notes.html#v9-3-0

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@Kiwi
Copy link
Member

Kiwi commented Jan 11, 2020

File "/nix/store/vgdm35qmpnhq9pnm1lny59vrc5v8rzkp-ocrmypdf-9.4.0/bin/.ocrmypdf-wrapped", line 6, in <module>
    from ocrmypdf.__main__ import run
  File "/nix/store/vgdm35qmpnhq9pnm1lny59vrc5v8rzkp-ocrmypdf-9.4.0/lib/python3.7/site-packages/ocrmypdf/__init__.py", line 18, in <module>
    from . import helpers, hocrtransform, leptonica, pdfa, pdfinfo
  File "/nix/store/vgdm35qmpnhq9pnm1lny59vrc5v8rzkp-ocrmypdf-9.4.0/lib/python3.7/site-packages/ocrmypdf/leptonica.py", line 67, in <module>
    """
ocrmypdf.exceptions.MissingDependencyError:
        ---------------------------------------------------------------------
        This error normally occurs when ocrmypdf can't find the Leptonica
        library, which is usually installed with Tesseract OCR. It could be that
        Tesseract is not installed properly, we can't find the installation
        on your system PATH environment variable.

        The library we are looking for is usually called:
            liblept-5.dll   (Windows)
            liblept*.dylib  (macOS)
            liblept*.so     (Linux/BSD)

        Please review our installation procedures to find a solution:
            https://ocrmypdf.readthedocs.io/en/latest/installation.html
        ---------------------------------------------------------------------

I get this error. :(

Copy link
Contributor

@flokli flokli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please take a look at the missing dependency error.

Copy link
Contributor

@jonringer jonringer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fails to execute:

$ ./results/ocrmypdf/bin/ocrmypdf --help
Traceback (most recent call last):
  File "/nix/store/vgdm35qmpnhq9pnm1lny59vrc5v8rzkp-ocrmypdf-9.4.0/bin/.ocrmypdf-wrapped", line 6, in <module>
    from ocrmypdf.__main__ import run
  File "/nix/store/vgdm35qmpnhq9pnm1lny59vrc5v8rzkp-ocrmypdf-9.4.0/lib/python3.7/site-packages/ocrmypdf/__init__.py", line 18, in <module>
    from . import helpers, hocrtransform, leptonica, pdfa, pdfinfo
  File "/nix/store/vgdm35qmpnhq9pnm1lny59vrc5v8rzkp-ocrmypdf-9.4.0/lib/python3.7/site-packages/ocrmypdf/leptonica.py", line 67, in <module>
    """
ocrmypdf.exceptions.MissingDependencyError:
        ---------------------------------------------------------------------
        This error normally occurs when ocrmypdf can't find the Leptonica
        library, which is usually installed with Tesseract OCR. It could be that
        Tesseract is not installed properly, we can't find the installation
        on your system PATH environment variable.

        The library we are looking for is usually called:
            liblept-5.dll   (Windows)
            liblept*.dylib  (macOS)
            liblept*.so     (Linux/BSD)

        Please review our installation procedures to find a solution:
            https://ocrmypdf.readthedocs.io/en/latest/installation.html
        ---------------------------------------------------------------------

EDIT: should have looked at other reviews xD

@dtzWill
Copy link
Member Author

dtzWill commented Jan 12, 2020

Thanks, apologies for not checking this myself :(.

Looking into it a bit, I'm not sure anything is broken/changed other than this error previously was only shown on Windows but now is shown elsewhere: ocrmypdf/OCRmyPDF@5b6ab1e (particularly: ocrmypdf/OCRmyPDF@5b6ab1e#diff-fa4c947e8b0794e9629141a00a65ec9dR50).

I'm not sure if this means we never had leptonica working, or if the check is misleading/broken (at least on NixOS, as packaged currently).

Unsure how to test this. It seems to find it during the build, as it generates the cffi module for it?

@dtzWill
Copy link
Member Author

dtzWill commented Jan 12, 2020

Oh, we already patch in the correct path-- but it's after the check :). Fix coming!

pkgs/tools/text/ocrmypdf/default.nix Outdated Show resolved Hide resolved
@dtzWill dtzWill changed the title ocrmypdf: 9.2.0 -> 9.4.0 ocrmypdf: 9.2.0 -> 9.5.0 Jan 22, 2020
@flokli flokli merged commit a61db03 into NixOS:master Jan 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants