2017-05-31 23:45:50 +01:00
|
|
|
{ stdenv, fetchPypi, buildPythonPackage, service-identity, requests, six
|
2017-09-05 10:16:41 +01:00
|
|
|
, mock, twisted, incremental, pep8, httpbin
|
|
|
|
}:
|
2017-02-06 20:27:24 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "treq";
|
2018-07-22 11:22:53 +01:00
|
|
|
version = "18.6.0";
|
2017-02-06 20:27:24 +00:00
|
|
|
|
2017-05-30 01:22:50 +01:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2018-07-22 11:22:53 +01:00
|
|
|
sha256 = "91e09ff6b524cc90aa5e934b909c8d0d1a9d36ebd618b6c38e37b17013e69f48";
|
2017-02-06 20:27:24 +00:00
|
|
|
};
|
|
|
|
|
2017-09-05 10:16:41 +01:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
requests
|
|
|
|
six
|
|
|
|
incremental
|
|
|
|
service-identity
|
|
|
|
twisted
|
2019-11-09 23:52:53 +00:00
|
|
|
]
|
2017-09-05 10:16:41 +01:00
|
|
|
# twisted [tls] requirements (we should find a way to list "extras")
|
2019-11-09 23:52:53 +00:00
|
|
|
++ twisted.extras.tls;
|
2017-02-06 20:27:24 +00:00
|
|
|
|
2017-05-30 01:22:50 +01:00
|
|
|
checkInputs = [
|
|
|
|
pep8
|
|
|
|
mock
|
2017-09-05 10:16:41 +01:00
|
|
|
httpbin
|
2017-05-30 01:22:50 +01:00
|
|
|
];
|
2017-02-06 20:27:24 +00:00
|
|
|
|
2017-05-30 01:22:50 +01:00
|
|
|
postPatch = ''
|
|
|
|
rm -fv src/treq/test/test_treq_integration.py
|
|
|
|
'';
|
2017-02-06 20:27:24 +00:00
|
|
|
|
2017-05-31 23:45:50 +01:00
|
|
|
# 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/
|
|
|
|
#'';
|
2017-05-30 01:22:50 +01:00
|
|
|
|
|
|
|
checkPhase = ''
|
2017-05-31 23:45:50 +01:00
|
|
|
pep8 --ignore=E902 treq
|
2017-05-30 01:22:50 +01:00
|
|
|
trial treq
|
2017-02-06 20:27:24 +00:00
|
|
|
'';
|
|
|
|
|
2017-09-05 10:16:41 +01:00
|
|
|
# Failing tests https://github.com/twisted/treq/issues/208
|
|
|
|
doCheck = false;
|
|
|
|
|
2017-02-06 20:27:24 +00:00
|
|
|
meta = with stdenv.lib; {
|
2017-11-10 21:13:27 +00:00
|
|
|
homepage = https://github.com/twisted/treq;
|
2017-02-06 20:27:24 +00:00
|
|
|
description = "A requests-like API built on top of twisted.web's Agent";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ nand0p ];
|
|
|
|
};
|
|
|
|
}
|