2021-01-25 08:26:54 +00:00
|
|
|
{ lib
|
2018-10-26 17:51:37 +01:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, unittest2
|
|
|
|
, pyasn1
|
2018-11-04 10:35:16 +00:00
|
|
|
, mock
|
2019-01-04 13:22:03 +00:00
|
|
|
, isPy3k
|
|
|
|
, pythonOlder
|
2020-06-11 09:07:58 +01:00
|
|
|
, poetry
|
2018-10-26 17:51:37 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "rsa";
|
2021-03-24 09:28:27 +00:00
|
|
|
version = "4.7.2";
|
2018-10-26 17:51:37 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-03-24 09:28:27 +00:00
|
|
|
sha256 = "9d689e6ca1b3038bc82bf8d23e944b6b6037bc02301a574935b2dd946e0353b9";
|
2018-10-26 17:51:37 +01:00
|
|
|
};
|
|
|
|
|
2018-11-04 10:35:16 +00:00
|
|
|
checkInputs = [ unittest2 mock ];
|
2018-10-26 17:51:37 +01:00
|
|
|
propagatedBuildInputs = [ pyasn1 ];
|
|
|
|
|
2021-01-24 00:29:22 +00:00
|
|
|
preConfigure = lib.optionalString (isPy3k && pythonOlder "3.7") ''
|
2019-01-04 13:22:03 +00:00
|
|
|
substituteInPlace setup.py --replace "open('README.md')" "open('README.md',encoding='utf-8')"
|
|
|
|
'';
|
|
|
|
|
2020-06-11 09:07:58 +01:00
|
|
|
# No tests in archive
|
|
|
|
doCheck = false;
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://stuvel.eu/rsa";
|
2018-10-26 17:51:37 +01:00
|
|
|
license = licenses.asl20;
|
|
|
|
description = "A pure-Python RSA implementation";
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|