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

A Collection of new python packages #28861

Closed
wants to merge 23 commits into from

Conversation

betaboon
Copy link
Contributor

@betaboon betaboon commented Sep 1, 2017

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
    • 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.

@Mic92
Copy link
Member

Mic92 commented Sep 1, 2017

Some tips regarding failing python tests:

  • You can skip selected non-working tests using: py.test -k 'not function_name and not other_function'.
  • A common error in python tests is non-unicode locales, can be fixed by including glibcLocales in buildInputs and exporting LC_ALL=en_US.utf-8: example 4a6295e
  • if a test tries to access $HOME, you can workaround by using export HOME=$(mktemp -d) before running tests.

@FRidh
Copy link
Member

FRidh commented Sep 2, 2017

@Mic92 added your suggestions to the docs in b7d257a and 0050483.

sha256 = "0skai72392n3i1c4bl3hn2kh5lj990qsbasdwkbjdcy6vq57jggf";
};

buildInputs = [ pytest ];
Copy link
Member

Choose a reason for hiding this comment

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

test dependencies can go in checkInputs. Note that checkInputs is a Python-only thing.

buildInputs = [ pytest ];
propagatedBuildInputs = [ requests requests_oauthlib six ];

patchPhase = ''
Copy link
Member

Choose a reason for hiding this comment

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

postPatch is preferable so that one can still use patches in the patchPhase.

@FRidh
Copy link
Member

FRidh commented Sep 6, 2017

Thank you. Added it to #29009.

@FRidh FRidh closed this Sep 6, 2017
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

3 participants