weboob: Disable doctests requiring networking

Unfortunately I haven't found a way for nose to disable doctests and the
-e/--exclude flag only works on unit tests.

So I'm using sed in postPatch to remove the doctests without mangling
the whole docstring.

I've built weboob and it now succeeds.

Signed-off-by: aszlig <aszlig@nix.build>
This commit is contained in:
aszlig 2018-04-27 20:35:23 +02:00
parent 805d9878c3
commit 89df48e9db
No known key found for this signature in database
GPG key ID: 684089CE67EBB691

View file

@ -16,6 +16,19 @@ buildPythonPackage rec {
sha256 = "0m5yh49lplvb57dfilczh65ky35fshp3g7ni31pwfxwqi1f7i4f9";
};
postPatch = ''
# Disable doctests that require networking:
sed -i -n -e '/^ *def \+pagination *(.*: *$/ {
p; n; p; /"""\|'\'\'\'''/!b
:loop
n; /^ *\(>>>\|\.\.\.\)/ { h; bloop }
x; /^ *\(>>>\|\.\.\.\)/bloop; x
p; /"""\|'\'\'\'''/b
bloop
}; p' weboob/browser/browsers.py weboob/browser/pages.py
'';
setupPyBuildFlags = ["--qt" "--xdg"];
checkInputs = [ nose ];
@ -33,7 +46,6 @@ buildPythonPackage rec {
homepage = http://weboob.org;
description = "Collection of applications and APIs to interact with websites without requiring the user to open a browser";
license = stdenv.lib.licenses.agpl3;
broken = true; # 2018-04-11
};
}