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
Contributor

@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
Contributor

@Kiwi 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

please take a look at the missing dependency error.

Copy link
Contributor

@jonringer jonringer left a comment

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
Contributor Author

@dtzWill 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: jbarlow83/OCRmyPDF@5b6ab1e (particularly: jbarlow83/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
Contributor Author

@dtzWill 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 added 2 commits Jan 22, 2020
@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
16 checks passed
16 checks passed
ocrmypdf on x86_64-darwin No attempt
Details
Evaluation Performance Report Evaluator Performance Report
Details
grahamcofborg-eval ^.^!
Details
grahamcofborg-eval-check-maintainers matching changed paths to changed attrs...
Details
grahamcofborg-eval-check-meta config.nix: checkMeta = true
Details
grahamcofborg-eval-darwin nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A darwin-tested
Details
grahamcofborg-eval-nixos nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release-combined.nix -A tested
Details
grahamcofborg-eval-nixos-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A manual
Details
grahamcofborg-eval-nixos-options nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./nixos/release.nix -A options
Details
grahamcofborg-eval-nixpkgs-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A manual
Details
grahamcofborg-eval-nixpkgs-tarball nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A tarball
Details
grahamcofborg-eval-nixpkgs-unstable-jobset nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="ofborg"; } ./pkgs/top-level/release.nix -A unstable
Details
grahamcofborg-eval-package-list nix-env -qa --json --file .
Details
grahamcofborg-eval-package-list-no-aliases nix-env -qa --json --file . --arg config { allowAliases = false; }
Details
ocrmypdf on aarch64-linux Success
Details
ocrmypdf on x86_64-linux Success
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.