depot/third_party/nixpkgs/pkgs/development/python-modules/rsa/default.nix
Default email 9405df4a82 Project import generated by Copybara.
GitOrigin-RevId: 8e4fe32876ca15e3d5eb3ecd3ca0b224417f5f17
2021-04-26 15:14:03 -04:00

37 lines
747 B
Nix

{ lib
, buildPythonPackage
, fetchPypi
, unittest2
, pyasn1
, mock
, isPy3k
, pythonOlder
, poetry
}:
buildPythonPackage rec {
pname = "rsa";
version = "4.7.2";
src = fetchPypi {
inherit pname version;
sha256 = "9d689e6ca1b3038bc82bf8d23e944b6b6037bc02301a574935b2dd946e0353b9";
};
checkInputs = [ unittest2 mock ];
propagatedBuildInputs = [ pyasn1 ];
preConfigure = lib.optionalString (isPy3k && pythonOlder "3.7") ''
substituteInPlace setup.py --replace "open('README.md')" "open('README.md',encoding='utf-8')"
'';
# No tests in archive
doCheck = false;
meta = with lib; {
homepage = "https://stuvel.eu/rsa";
license = licenses.asl20;
description = "A pure-Python RSA implementation";
};
}