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

invoice2data: init at 0.2.93 #40925

Closed
wants to merge 172 commits into from
Closed

Conversation

PsyanticY
Copy link
Contributor

@PsyanticY PsyanticY commented May 22, 2018

Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • 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 nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

LnL7 and others added 3 commits April 11, 2018 19:18
@flokli
Copy link
Contributor

flokli commented May 22, 2018

@Assassinkin thanks for the PR! Can you please rebase your commits, and fix the messages to look like described in CONTRIBUTING.md?

There's commits in there doing various things to gpgmailencrypt and goocalendar, which don't seem to belong in here.

@PsyanticY PsyanticY force-pushed the Invoice2data branch 2 times, most recently from 5d5265b to 7ede00f Compare May 22, 2018 21:12
@PsyanticY
Copy link
Contributor Author

@flokli Thanks. rebased and updated the commit message.

@flokli
Copy link
Contributor

flokli commented May 22, 2018

According to invoice2data/input, valid input readers are one of tesseract, pdftotext and pdfminer - the first two rely on tesseract, convert and pdftotext being in $PATH, and I'm not sure how pdfminer should even work, given the code there tries to import a pdfminer python module which is not specified in its dependencies.

I'd suggest to either prefix $PATH in the wrapper to contain these two binaries, or patch the src to set the path there explicitly. Maybe it's less hary to go with the first option.

Any idea how pdfminer is supposed to work?

@AmineChikhaoui
Copy link
Member

@GrahamcOfBorg build pythonPackages.invoice2data .

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: pythonPackages.invoice2data

The following builds were skipped because they don't evaluate on aarch64-linux: .

Partial log (click to expand)

Successfully installed invoice2data-0.2.92
/build/invoice2data-0.2.92
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/ziqz5y966s43517dx4100fqawnb8dn8x-python2.7-invoice2data-0.2.92
strip is /nix/store/jk6j4lh9v5mvjdbdc35sj0zffhhf6s56-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/ziqz5y966s43517dx4100fqawnb8dn8x-python2.7-invoice2data-0.2.92/lib  /nix/store/ziqz5y966s43517dx4100fqawnb8dn8x-python2.7-invoice2data-0.2.92/bin
patching script interpreter paths in /nix/store/ziqz5y966s43517dx4100fqawnb8dn8x-python2.7-invoice2data-0.2.92
checking for references to /build in /nix/store/ziqz5y966s43517dx4100fqawnb8dn8x-python2.7-invoice2data-0.2.92...
wrapping `/nix/store/ziqz5y966s43517dx4100fqawnb8dn8x-python2.7-invoice2data-0.2.92/bin/invoice2data'...
/nix/store/ziqz5y966s43517dx4100fqawnb8dn8x-python2.7-invoice2data-0.2.92

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: pythonPackages.invoice2data

The following builds were skipped because they don't evaluate on x86_64-linux: .

Partial log (click to expand)

Installing collected packages: invoice2data
Successfully installed invoice2data-0.2.92
/build/invoice2data-0.2.92
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/x4yq65qgrcj1xvvrkkyvhpdwnrxdpc11-python2.7-invoice2data-0.2.92
strip is /nix/store/j75dgadrff2d1fyc4fczmcgqkid2imdx-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/x4yq65qgrcj1xvvrkkyvhpdwnrxdpc11-python2.7-invoice2data-0.2.92/lib  /nix/store/x4yq65qgrcj1xvvrkkyvhpdwnrxdpc11-python2.7-invoice2data-0.2.92/bin
patching script interpreter paths in /nix/store/x4yq65qgrcj1xvvrkkyvhpdwnrxdpc11-python2.7-invoice2data-0.2.92
checking for references to /build in /nix/store/x4yq65qgrcj1xvvrkkyvhpdwnrxdpc11-python2.7-invoice2data-0.2.92...
wrapping `/nix/store/x4yq65qgrcj1xvvrkkyvhpdwnrxdpc11-python2.7-invoice2data-0.2.92/bin/invoice2data'...

@PsyanticY
Copy link
Contributor Author

@flokli Thanks for the review. I Included the binaries in the PATH as you suggested. For pdfminer, I couldn't really find how it is being imported there, I opened an issue in the project repo.

@flokli
Copy link
Contributor

flokli commented May 23, 2018

upstream issue for the pdfminer input reader: invoice-x/invoice2data#132

@@ -9,15 +9,17 @@ buildPythonPackage rec {
sha256 = "0p3ka85n0qmdkrjffvqgcj3pbl002srrlcjdk8pyhhwg6b78d4l7";
};

makeWrapperArgs = ["--prefix" "PATH" ":" "${tesseract}/bin/tesseract:${imagemagick}/bin/convert:${xpdf}/bin/pdftotext" ];
Copy link
Contributor

@flokli flokli May 23, 2018

Choose a reason for hiding this comment

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

This doesn't work, you need to just add the path to packages 'bin' directory, not the executable itself.
For multiple packages, this can also look like this:

makeWrapperArgs = ["--prefix" "PATH" ":" "${stdenv.lib.makeBinPath [ imagemagick tesseract xpdf ]}"];

license = licenses.gpl3;
description = "Data extractor for PDF invoices - invoice2data";
homepage = https://github.com/invoice-x/invoice2data;
license = licenses.mit;
Copy link
Contributor

@flokli flokli May 23, 2018

Choose a reason for hiding this comment

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

I missed the meta block in my last review. Can you squash that into the first commit, so the remains of gpgmailencrypt are gone? (or squash everything together)

@PsyanticY
Copy link
Contributor Author

@flokli Rebased the branch.
The module is using pdfminer.six instead of pdfminer which is available only for python27. And the package owner is commenting it ( pdfminer.six) in the requirements file.
pdfminer.six is not currently available in nixpkgs though.

@PsyanticY
Copy link
Contributor Author

PsyanticY commented May 24, 2018

One of the maintainer of the package replyed on invoice-x/invoice2data#132 :

It doesn't work very well and is only optional. So it's not in the requirements.

I think we can either put this PR on hold till pdfminer.six get packaged or we can proceed without it as it is optional and it doesn't work well per the owner comment.
cc @flokli

@flokli
Copy link
Contributor

flokli commented May 24, 2018

I'd say it's fine to leave it broken, maybe we should add a comment in our .nix file, in case sb wonders :-)

Can you test and bump to v0.2.93? This contains a fix for a invoice-x/invoice2data#134 I found out about yesterday, while trying to test it.

@PsyanticY PsyanticY changed the title pythonPackages.invoice2data: init at 0.2.92 pythonPackages.invoice2data: init at 0.2.93 May 24, 2018
@xeji
Copy link
Contributor

xeji commented May 25, 2018

@GrahamcOfBorg build pythonPackages.invoice2data

@GrahamcOfBorg
Copy link

Success on x86_64-darwin (full log)

Attempted: pythonPackages.invoice2data

Partial log (click to expand)

Requirement already satisfied: tzlocal in /nix/store/b8wrn5k66vp4ha3j064zr8dmpy4yrlk7-python2.7-tzlocal-1.5.1/lib/python2.7/site-packages (from dateparser->invoice2data==0.2.93)
Requirement already satisfied: six>=1.5 in /nix/store/vdf3cj4k3v84h8m1h4r6lxminl1h4icz-python2.7-six-1.11.0/lib/python2.7/site-packages (from python-dateutil->dateparser->invoice2data==0.2.93)
Installing collected packages: invoice2data
Successfully installed invoice2data-0.2.93
/private/tmp/nix-build-python2.7-invoice2data-0.2.93.drv-0/invoice2data-0.2.93
post-installation fixup
strip is /nix/store/kdff2gim6417493yha769kh00n63lnrw-cctools-binutils-darwin/bin/strip
stripping (with command strip and flags -S) in /nix/store/dgz9rlz2ahnapjdf06fdhvk2lqk9cas8-python2.7-invoice2data-0.2.93/lib  /nix/store/dgz9rlz2ahnapjdf06fdhvk2lqk9cas8-python2.7-invoice2data-0.2.93/bin
patching script interpreter paths in /nix/store/dgz9rlz2ahnapjdf06fdhvk2lqk9cas8-python2.7-invoice2data-0.2.93
wrapping `/nix/store/dgz9rlz2ahnapjdf06fdhvk2lqk9cas8-python2.7-invoice2data-0.2.93/bin/invoice2data'...

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: pythonPackages.invoice2data

Partial log (click to expand)

Installing collected packages: invoice2data
Successfully installed invoice2data-0.2.93
/build/invoice2data-0.2.93
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/rczlky1z1a4w9inmyyfd68p65w59sax7-python2.7-invoice2data-0.2.93
strip is /nix/store/j75dgadrff2d1fyc4fczmcgqkid2imdx-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/rczlky1z1a4w9inmyyfd68p65w59sax7-python2.7-invoice2data-0.2.93/lib  /nix/store/rczlky1z1a4w9inmyyfd68p65w59sax7-python2.7-invoice2data-0.2.93/bin
patching script interpreter paths in /nix/store/rczlky1z1a4w9inmyyfd68p65w59sax7-python2.7-invoice2data-0.2.93
checking for references to /build in /nix/store/rczlky1z1a4w9inmyyfd68p65w59sax7-python2.7-invoice2data-0.2.93...
wrapping `/nix/store/rczlky1z1a4w9inmyyfd68p65w59sax7-python2.7-invoice2data-0.2.93/bin/invoice2data'...

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: pythonPackages.invoice2data

Partial log (click to expand)

Successfully installed invoice2data-0.2.93
/build/invoice2data-0.2.93
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/30i8ds0izq8ryzmf1fsybk9g04wikdy6-python2.7-invoice2data-0.2.93
strip is /nix/store/jk6j4lh9v5mvjdbdc35sj0zffhhf6s56-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/30i8ds0izq8ryzmf1fsybk9g04wikdy6-python2.7-invoice2data-0.2.93/lib  /nix/store/30i8ds0izq8ryzmf1fsybk9g04wikdy6-python2.7-invoice2data-0.2.93/bin
patching script interpreter paths in /nix/store/30i8ds0izq8ryzmf1fsybk9g04wikdy6-python2.7-invoice2data-0.2.93
checking for references to /build in /nix/store/30i8ds0izq8ryzmf1fsybk9g04wikdy6-python2.7-invoice2data-0.2.93...
wrapping `/nix/store/30i8ds0izq8ryzmf1fsybk9g04wikdy6-python2.7-invoice2data-0.2.93/bin/invoice2data'...
/nix/store/30i8ds0izq8ryzmf1fsybk9g04wikdy6-python2.7-invoice2data-0.2.93

segfaults with qt5.10, downgrade to 5.9
tries to load its homegrown libqxcb.so which does not find some libs,
use nixpkgs libqxcb.so instead.
adisbladis and others added 19 commits May 30, 2018 12:00
Fix build with libnetfilter_conntrack 1.0.7.
If test_xmlast runs before test_pyPEG2, the tests fail with:

ERROR: runTest (pypeg2.test.test_pyPEG2.ParseInvisibleTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/pyPEG2-2.15.2/pypeg2/test/test_pyPEG2.py", line 258, in runTest
    self.assertEqual(r._ignore1, None)
AttributeError: 'C1' object has no attribute '_ignore1'

https://hydra.nixos.org/build/74632015
* terminus: gnome2 cleanup

* terminus: use toplevel gtk2
sddm: add support for hidpi mode
Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools.

This update was made based on information from https://repology.org/metapackage/thttpd/versions.

These checks were done:

- built on NixOS
- Warning: no invocation of /nix/store/hbab4sxrd03rn29fr2hzxcqhdb11ac7r-thttpd-2.29/bin/htpasswd had a zero exit code or showed the expected version
- Warning: no invocation of /nix/store/hbab4sxrd03rn29fr2hzxcqhdb11ac7r-thttpd-2.29/bin/makeweb had a zero exit code or showed the expected version
- /nix/store/hbab4sxrd03rn29fr2hzxcqhdb11ac7r-thttpd-2.29/bin/syslogtocern passed the binary check.
- /nix/store/hbab4sxrd03rn29fr2hzxcqhdb11ac7r-thttpd-2.29/bin/thttpd passed the binary check.
- 2 of 4 passed binary check by having a zero exit code.
- 0 of 4 passed binary check by having the new version present in output.
- found 2.29 with grep in /nix/store/hbab4sxrd03rn29fr2hzxcqhdb11ac7r-thttpd-2.29
- directory tree listing: https://gist.github.com/e0eb71192cc958ded9003250a4a4f65b
- du listing: https://gist.github.com/890be31bcaa84f99915896503cde2679
Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools.

This update was made based on information from https://repology.org/metapackage/rr/versions.

These checks were done:

- built on NixOS
- /nix/store/yavka83b6xy0fd22d63gvs5jhzq2yl4f-rr-5.2.0/bin/signal-rr-recording.sh passed the binary check.
- Warning: no invocation of /nix/store/yavka83b6xy0fd22d63gvs5jhzq2yl4f-rr-5.2.0/bin/rr_page_64 had a zero exit code or showed the expected version
- Warning: no invocation of /nix/store/yavka83b6xy0fd22d63gvs5jhzq2yl4f-rr-5.2.0/bin/rr_page_64_replay had a zero exit code or showed the expected version
- Warning: no invocation of /nix/store/yavka83b6xy0fd22d63gvs5jhzq2yl4f-rr-5.2.0/bin/rr_page_32 had a zero exit code or showed the expected version
- Warning: no invocation of /nix/store/yavka83b6xy0fd22d63gvs5jhzq2yl4f-rr-5.2.0/bin/rr_page_32_replay had a zero exit code or showed the expected version
- /nix/store/yavka83b6xy0fd22d63gvs5jhzq2yl4f-rr-5.2.0/bin/rr passed the binary check.
- Warning: no invocation of /nix/store/yavka83b6xy0fd22d63gvs5jhzq2yl4f-rr-5.2.0/bin/rr_exec_stub had a zero exit code or showed the expected version
- 2 of 7 passed binary check by having a zero exit code.
- 1 of 7 passed binary check by having the new version present in output.
- found 5.2.0 with grep in /nix/store/yavka83b6xy0fd22d63gvs5jhzq2yl4f-rr-5.2.0
- directory tree listing: https://gist.github.com/74edbd75eb39af483431d15e9b4c34a8
- du listing: https://gist.github.com/a6983da3782900061246fd222ecc50f9
@PsyanticY PsyanticY closed this May 30, 2018
@PsyanticY PsyanticY deleted the Invoice2data branch May 30, 2018 11:16
@PsyanticY
Copy link
Contributor Author

Sorry about that closing and restarting with a new branch

@PsyanticY PsyanticY restored the Invoice2data branch May 30, 2018 11:46
@PsyanticY PsyanticY mentioned this pull request May 30, 2018
7 tasks
@ttuegel ttuegel removed their request for review May 30, 2018 15:17
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