2017-05-30 02:22:50 +02:00
|
|
|
{ stdenv, fetchPypi, buildPythonPackage, service-identity, requests, six,
|
|
|
|
mock, twisted, incremental, pep8, sphinx, openssl, pyopenssl, tox }:
|
2017-02-06 21:27:24 +01:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
name = "${pname}-${version}";
|
|
|
|
pname = "treq";
|
2017-05-27 14:24:47 +02:00
|
|
|
version = "17.3.1";
|
2017-02-06 21:27:24 +01:00
|
|
|
|
2017-05-30 02:22:50 +02:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
|
|
|
sha256 = "1xhcpvsl3xqw0dq9sixk80iwyiv17djigp3815sy5pfgvvggcfii";
|
2017-02-06 21:27:24 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
service-identity
|
2017-05-07 12:55:45 +02:00
|
|
|
requests
|
2017-02-06 21:27:24 +01:00
|
|
|
twisted
|
|
|
|
incremental
|
|
|
|
sphinx
|
|
|
|
six
|
|
|
|
openssl
|
|
|
|
pyopenssl
|
2017-05-30 02:22:50 +02:00
|
|
|
tox
|
2017-02-06 21:27:24 +01:00
|
|
|
];
|
|
|
|
|
2017-05-30 02:22:50 +02:00
|
|
|
checkInputs = [
|
|
|
|
pep8
|
|
|
|
mock
|
|
|
|
];
|
2017-02-06 21:27:24 +01:00
|
|
|
|
2017-05-30 02:22:50 +02:00
|
|
|
postPatch = ''
|
|
|
|
rm -fv src/treq/test/test_treq_integration.py
|
|
|
|
'';
|
2017-02-06 21:27:24 +01:00
|
|
|
|
|
|
|
postBuild = ''
|
2017-05-30 02:22:50 +02:00
|
|
|
# build documentation and install in $out
|
|
|
|
tox -e docs
|
|
|
|
mkdir -pv $out/docs
|
|
|
|
cp -rv docs/* $out/docs/
|
|
|
|
'';
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
${pep8}/bin/pep8 --ignore=E902 treq
|
|
|
|
trial treq
|
2017-02-06 21:27:24 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
homepage = http://github.com/twisted/treq;
|
|
|
|
description = "A requests-like API built on top of twisted.web's Agent";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ nand0p ];
|
|
|
|
};
|
|
|
|
}
|