mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2025-01-08 06:28:50 +03:00
commit
c6ea7d3a66
@ -1,23 +1,17 @@
|
|||||||
{ stdenv, fetchurl, buildPythonPackage, service-identity, requests,
|
{ stdenv, fetchPypi, buildPythonPackage, service-identity, requests, six,
|
||||||
six, mock, twisted, incremental, coreutils, gnumake, pep8, sphinx,
|
mock, twisted, incremental, pep8, sphinx, openssl, pyopenssl, tox }:
|
||||||
openssl, pyopenssl }:
|
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
name = "${pname}-${version}";
|
name = "${pname}-${version}";
|
||||||
pname = "treq";
|
pname = "treq";
|
||||||
version = "17.3.1";
|
version = "17.3.1";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchPypi {
|
||||||
url = "mirror://pypi/t/${pname}/${name}.tar.gz";
|
inherit pname version;
|
||||||
sha256 = "313af6dedecfdde2750968dc17653b6147cf2340b3479d70031cf741f5be0cf6";
|
sha256 = "1xhcpvsl3xqw0dq9sixk80iwyiv17djigp3815sy5pfgvvggcfii";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
pep8
|
|
||||||
mock
|
|
||||||
];
|
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
|
||||||
service-identity
|
service-identity
|
||||||
requests
|
requests
|
||||||
twisted
|
twisted
|
||||||
@ -26,22 +20,30 @@ buildPythonPackage rec {
|
|||||||
six
|
six
|
||||||
openssl
|
openssl
|
||||||
pyopenssl
|
pyopenssl
|
||||||
|
tox
|
||||||
];
|
];
|
||||||
|
|
||||||
|
checkInputs = [
|
||||||
|
pep8
|
||||||
|
mock
|
||||||
|
];
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
rm -fv src/treq/test/test_treq_integration.py
|
||||||
|
'';
|
||||||
|
|
||||||
|
postBuild = ''
|
||||||
|
# build documentation and install in $out
|
||||||
|
tox -e docs
|
||||||
|
mkdir -pv $out/docs
|
||||||
|
cp -rv docs/* $out/docs/
|
||||||
|
'';
|
||||||
|
|
||||||
checkPhase = ''
|
checkPhase = ''
|
||||||
${pep8}/bin/pep8 --ignore=E902 treq
|
${pep8}/bin/pep8 --ignore=E902 treq
|
||||||
trial treq
|
trial treq
|
||||||
'';
|
'';
|
||||||
|
|
||||||
doCheck = false;
|
|
||||||
# Failure: twisted.web._newclient.RequestTransmissionFailed: [<twisted.python.failure.Failure OpenSSL.SSL.Error: [('SSL routines', 'ssl3_get_server_certificate', 'certificate verify failed')]>]
|
|
||||||
|
|
||||||
postBuild = ''
|
|
||||||
${coreutils}/bin/mkdir -pv treq
|
|
||||||
${coreutils}/bin/echo "${version}" | ${coreutils}/bin/tee treq/_version
|
|
||||||
cd docs && ${gnumake}/bin/make html && cd ..
|
|
||||||
'';
|
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
homepage = http://github.com/twisted/treq;
|
homepage = http://github.com/twisted/treq;
|
||||||
description = "A requests-like API built on top of twisted.web's Agent";
|
description = "A requests-like API built on top of twisted.web's Agent";
|
||||||
|
Loading…
Reference in New Issue
Block a user