Python: reduce amount of warnings when building with `buildPython*`

By default all warnings were printed. This occasionally resulted in
a lot of warnings leading to builds being killed.

This commit reduces the amount of warnings printed.
wip/yesman
Frederik Rietdijk 6 years ago
parent cb4ff927a1
commit c1e003ff2f
  1. 4
      pkgs/development/interpreters/python/mk-python-derivation.nix
  2. 3
      pkgs/development/python-modules/pytest/default.nix

@ -101,6 +101,10 @@ toPythonModule (python.stdenv.mkDerivation (builtins.removeAttrs attrs [
${python.interpreter} ${./catch_conflicts}/catch_conflicts.py
'' + attrs.postFixup or '''';
# Print fewer warnings so we have less noise in our logs
# The amount of warnings also caused builds to be terminated.
PYTHONWARNINGS="once";
meta = {
# default to python's platforms
platforms = python.meta.platforms;

@ -24,7 +24,8 @@ buildPythonPackage rec {
checkPhase = ''
runHook preCheck
$out/bin/py.test -x testing/
# Re-enable warnings because the test suite relies on it.
PYTHONWARNINGS= $out/bin/py.test -x testing/
runHook postCheck
'';

Loading…
Cancel
Save