python3.pkgs.rsa: 4.0 -> 4.1

keep python2 at 4.0
This commit is contained in:
Frederik Rietdijk 2020-06-11 10:07:58 +02:00
parent 829d30b4bb
commit 858a96035c
3 changed files with 41 additions and 1 deletions

View file

@ -0,0 +1,33 @@
{ stdenv
, buildPythonPackage
, fetchPypi
, unittest2
, pyasn1
, mock
, isPy3k
, pythonOlder
}:
buildPythonPackage rec {
pname = "rsa";
version = "4.0";
src = fetchPypi {
inherit pname version;
sha256 = "1a836406405730121ae9823e19c6e806c62bbad73f890574fff50efa4122c487";
};
checkInputs = [ unittest2 mock ];
propagatedBuildInputs = [ pyasn1 ];
preConfigure = stdenv.lib.optionalString (isPy3k && pythonOlder "3.7") ''
substituteInPlace setup.py --replace "open('README.md')" "open('README.md',encoding='utf-8')"
'';
meta = with stdenv.lib; {
homepage = "https://stuvel.eu/rsa";
license = licenses.asl20;
description = "A pure-Python RSA implementation";
};
}

View file

@ -6,6 +6,7 @@
, mock
, isPy3k
, pythonOlder
, poetry
}:
buildPythonPackage rec {
@ -24,6 +25,9 @@ buildPythonPackage rec {
substituteInPlace setup.py --replace "open('README.md')" "open('README.md',encoding='utf-8')"
'';
# No tests in archive
doCheck = false;
meta = with stdenv.lib; {
homepage = "https://stuvel.eu/rsa";
license = licenses.asl20;

View file

@ -6174,7 +6174,10 @@ in {
rpyc = callPackage ../development/python-modules/rpyc { };
rsa = callPackage ../development/python-modules/rsa { };
rsa = if isPy3k then
callPackage ../development/python-modules/rsa { }
else
callPackage ../development/python-modules/rsa/4_0.nix { };
squaremap = callPackage ../development/python-modules/squaremap { };