2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, unittest2
|
|
|
|
, pyasn1
|
|
|
|
, mock
|
|
|
|
, isPy3k
|
|
|
|
, pythonOlder
|
2020-06-15 15:56:04 +00:00
|
|
|
, poetry
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "rsa";
|
2020-09-25 04:45:31 +00:00
|
|
|
version = "4.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-09-25 04:45:31 +00:00
|
|
|
sha256 = "109ea5a66744dd859bf16fe904b8d8b627adafb9408753161e766a92e7d681fa";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
checkInputs = [ unittest2 mock ];
|
|
|
|
propagatedBuildInputs = [ pyasn1 ];
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
preConfigure = lib.optionalString (isPy3k && pythonOlder "3.7") ''
|
2020-04-24 23:36:52 +00:00
|
|
|
substituteInPlace setup.py --replace "open('README.md')" "open('README.md',encoding='utf-8')"
|
|
|
|
'';
|
|
|
|
|
2020-06-15 15:56:04 +00:00
|
|
|
# No tests in archive
|
|
|
|
doCheck = false;
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://stuvel.eu/rsa";
|
|
|
|
license = licenses.asl20;
|
|
|
|
description = "A pure-Python RSA implementation";
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|