pythonPackages.IMAPClient: 0.13 -> 2.1.0

This commit is contained in:
Alma Cemerlic 2020-03-13 11:31:28 -04:00 committed by Jon
parent 403a4b1ced
commit 34fd0c0968
1 changed files with 18 additions and 15 deletions

View File

@ -1,32 +1,35 @@
{ stdenv { stdenv
, buildPythonPackage , buildPythonPackage
, fetchurl , fetchFromGitHub
, isPy34
, isPy35
, mock , mock
, six
}: }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "IMAPClient"; pname = "IMAPClient";
version = "0.13"; version = "2.1.0";
disabled = isPy34 || isPy35;
src = fetchurl { src = fetchFromGitHub {
url = "https://freshfoo.com/projects/IMAPClient/${pname}-${version}.tar.gz"; owner = "mjs";
sha256 = "0v7kd1crdbff0rmh4ddm5qszkis6hpk9084qh94al8h7g4y9l3is"; repo = "imapclient";
rev = version;
sha256 = "1zc8qj8ify2zygbz255b6fcg7jhprswf008ccwjmbrnj08kh9l4x";
}; };
buildInputs = [ mock ]; # fix test failing in python 36
postPatch = ''
preConfigure = '' substituteInPlace tests/test_imapclient.py \
sed -i '/distribute_setup/d' setup.py --replace "if sys.version_info >= (3, 7):" "if sys.version_info >= (3, 6, 4):"
substituteInPlace setup.py --replace "mock==0.8.0" "mock"
''; '';
propagatedBuildInputs = [ six ];
checkInputs = [ mock ];
meta = with stdenv.lib; { meta = with stdenv.lib; {
homepage = https://imapclient.readthedocs.io/en/2.1.0/; homepage = "https://imapclient.readthedocs.io";
description = "Easy-to-use, Pythonic and complete IMAP client library"; description = "Easy-to-use, Pythonic and complete IMAP client library";
license = licenses.bsd3; license = licenses.bsd3;
maintainers = [ maintainers.almac ];
}; };
} }