Skip to content

buku: Enabled tests and added shell completion #26968

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

Merged
merged 3 commits into from
Jul 8, 2017

Conversation

infinisil
Copy link
Member

@infinisil infinisil commented Jun 29, 2017

Motivation for this change

Completion wasn't being installed for buku which provides one for zsh, fish and bash. Tests were disabled previously because they failed. Since buku has a lot more test cases since 3.0 it's nice to have them run and succeed.

Had to patch 3 things in the tests though:

  • One which requires internet connection I disabled
  • One test dependency was version freezed (see reqs: Lower bound hypothesis jarun/buku#167) which I patched (can be removed when that PR is merged and new version released)
  • Another issue was due to locale issues.
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
    • Linux
  • 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.

Sorry, something went wrong.

@infinisil
Copy link
Member Author

Pinging @matthiasbeyer as the mention bot seems to be sleeping.

Copy link
Contributor

@matthiasbeyer matthiasbeyer left a comment

Choose a reason for hiding this comment

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

Builds and works for me. Re-evaluating this on another machine, to be sure. 👍

@matthiasbeyer
Copy link
Contributor

On a debian machine I get

these derivations will be built:
  /nix/store/lls7dzqxs0dzlcqfwza376mphh41fqmd-shell.drv
building path(s) ‘/nix/store/1z6hvdphwvazy05fjn3g69a10m757lgq-shell’
builder for ‘/nix/store/lls7dzqxs0dzlcqfwza376mphh41fqmd-shell.drv’ failed to produce output path ‘/nix/store/1z6hvdphwvazy05fjn3g69a10m757lgq-shell’
error: build of ‘/nix/store/lls7dzqxs0dzlcqfwza376mphh41fqmd-shell.drv’ failed

And I don't know whether this is related or so...

@@ -12,20 +11,41 @@ with pythonPackages; buildPythonApplication rec {
sha256 = "1a33x3197vi5s8rq5fvhy021jdlsc8ww8zc4kysss6r9mvdlk7ax";
};

buildInputs = [
Copy link
Member

Choose a reason for hiding this comment

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

these should be nativeBuildInputs, I think

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed

doCheck = false;
mkdir -p $out/share/zsh/site-functions $out/share/bash-completion/completions $out/share/fish/vendor_completions.d
Copy link
Member

Choose a reason for hiding this comment

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

Is there a reason make install is not installing these? Maybe open an issue if you think it should be the default.

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point, I may do that

Copy link
Member Author

Choose a reason for hiding this comment

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

# https://github.com/jarun/Buku/pull/167
substituteInPlace setup.py \
--replace "hypothesis==3.7.0" "hypothesis>=3.7.0"
Copy link
Member

Choose a reason for hiding this comment

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

This seems like something to fix upstream. I guess it's fine for now though... just make sure to get rid of it as soon as it's no longer needed.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, but my python knowledge is so limited I couldn't do it myself, I'll keep an eye on it though

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@infinisil
Copy link
Member Author

Built in an Ubuntu VM no problem, I'll have a look at Darwin now..

@infinisil
Copy link
Member Author

Doesn't build on darwin, the dependency python3.6-cffi-1.10.0 fails on the tests, not buku itself, maybe this can be worked on in a separate PR.

# Should be upstream, see https://github.com/jarun/Buku/pull/167
substituteInPlace setup.py \
--replace "hypothesis==3.7.0" "hypothesis>=3.7.0"
Copy link
Member Author

Choose a reason for hiding this comment

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

Update: This would get fixed with jarun/buku#167, thanks @rachmadaniHaryono! Can therefore be removed when Buku is bumped next time

export PYTHONIOENCODING=utf-8
### Remove this for 3.1 ###
# See https://github.com/jarun/Buku/pull/167 (merged)
Copy link
Member Author

Choose a reason for hiding this comment

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

jarun/buku#167 is merged, I added a note for the next version bump :)

@grahamc grahamc merged commit 800d449 into NixOS:master Jul 8, 2017
@infinisil infinisil deleted the buku-tests-and-completions branch July 14, 2017 16:11
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.

None yet

4 participants