diff options
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/treq')
-rw-r--r-- | nixpkgs/pkgs/development/python-modules/treq/default.nix | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/treq/default.nix b/nixpkgs/pkgs/development/python-modules/treq/default.nix new file mode 100644 index 000000000000..477223e96186 --- /dev/null +++ b/nixpkgs/pkgs/development/python-modules/treq/default.nix @@ -0,0 +1,56 @@ +{ lib, stdenv, fetchPypi, buildPythonPackage, service-identity, requests, six +, mock, twisted, incremental, pep8, httpbin +}: + +buildPythonPackage rec { + pname = "treq"; + version = "20.9.0"; + + src = fetchPypi { + inherit pname version; + sha256 = "83cd2ca75aef4f1fbdbe144c186426d930c3e8b20385df8cec9e12d442986da2"; + }; + + propagatedBuildInputs = [ + requests + six + incremental + service-identity + twisted + ] + # twisted [tls] requirements (we should find a way to list "extras") + ++ twisted.extras.tls; + + checkInputs = [ + pep8 + mock + httpbin + ]; + + postPatch = '' + rm -fv src/treq/test/test_treq_integration.py + ''; + + # XXX tox tries to install coverage despite it is installed + #postBuild = '' + # # build documentation and install in $out + # tox -e docs + # mkdir -pv $out/docs + # cp -rv docs/* $out/docs/ + #''; + + checkPhase = '' + pep8 --ignore=E902 treq + trial treq + ''; + + # Failing tests https://github.com/twisted/treq/issues/208 + doCheck = false; + + meta = with lib; { + homepage = "https://github.com/twisted/treq"; + description = "A requests-like API built on top of twisted.web's Agent"; + license = licenses.mit; + maintainers = with maintainers; [ nand0p ]; + }; +} |