nixpkgs/pkgs/development/python-modules/rsa/default.nix
Frederik Rietdijk 858a96035c python3.pkgs.rsa: 4.0 -> 4.1
keep python2 at 4.0
2020-06-11 10:07:58 +02:00

37 lines
762 B
Nix

{ stdenv
, buildPythonPackage
, fetchPypi
, unittest2
, pyasn1
, mock
, isPy3k
, pythonOlder
, poetry
}:
buildPythonPackage rec {
pname = "rsa";
version = "4.1";
src = fetchPypi {
inherit pname version;
sha256 = "6fa6a54eb72bfc0abca7f27880b978b14a643ba2a6ad9f4a56a95be82129ca1b";
};
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')"
'';
# No tests in archive
doCheck = false;
meta = with stdenv.lib; {
homepage = "https://stuvel.eu/rsa";
license = licenses.asl20;
description = "A pure-Python RSA implementation";
};
}