nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib
2, buildPythonPackage
3, fetchPypi
4, isPy27
5, webob
6, six
7, beautifulsoup4
8, waitress
9, pyquery
10, wsgiproxy2
11, pastedeploy
12, pytestCheckHook
13}:
14
15buildPythonPackage rec {
16 version = "3.0.0";
17 pname = "webtest";
18 disabled = isPy27; # paste.deploy is not longer a valid import
19
20 src = fetchPypi {
21 pname = "WebTest";
22 inherit version;
23 sha256 = "54bd969725838d9861a9fa27f8d971f79d275d94ae255f5c501f53bb6d9929eb";
24 };
25
26 postPatch = ''
27 substituteInPlace setup.py --replace "nose<1.3.0" "nose"
28 '';
29
30 propagatedBuildInputs = [
31 webob
32 six
33 beautifulsoup4
34 waitress
35 ];
36
37 checkInputs = [
38 pytestCheckHook
39 pastedeploy
40 wsgiproxy2
41 pyquery
42 ];
43
44 # Some of the tests use localhost networking.
45 __darwinAllowLocalNetworking = true;
46
47 pythonImportsCheck = [ "webtest" ];
48
49 meta = with lib; {
50 description = "Helper to test WSGI applications";
51 homepage = "https://webtest.readthedocs.org/en/latest/";
52 license = licenses.mit;
53 maintainers = with maintainers; [ ];
54 };
55}