ansible-later: 2.0.22 -> 2.0.23
[NixPkgs.git] / pkgs / development / python-modules / rsa / default.nix
blob0a70f8d8b08841379e35ff52436d756555c257d4
1 { lib
2 , buildPythonPackage
3 , fetchPypi
4 , unittest2
5 , pyasn1
6 , mock
7 , isPy3k
8 , pythonOlder
9 }:
11 buildPythonPackage rec {
12   pname = "rsa";
13   version = "4.9";
15   src = fetchPypi {
16     inherit pname version;
17     sha256 = "sha256-44RkpJxshdfxNRsBJmYUh6fgoUpQ8WdexQ6zTU8g7yE=";
18   };
20   checkInputs = [ unittest2 mock ];
21   propagatedBuildInputs = [ pyasn1 ];
23   preConfigure = lib.optionalString (isPy3k && pythonOlder "3.7") ''
24     substituteInPlace setup.py --replace "open('README.md')" "open('README.md',encoding='utf-8')"
25   '';
27   # No tests in archive
28   doCheck = false;
30   meta = with lib; {
31     homepage = "https://stuvel.eu/rsa";
32     license = licenses.asl20;
33     description = "A pure-Python RSA implementation";
34   };