depot/third_party/nixpkgs/pkgs/development/python-modules/rsa/default.nix
Default email bcb2f287e1 Project import generated by Copybara.
GitOrigin-RevId: d603719ec6e294f034936c0d0dc06f689d91b6c3
2024-06-20 20:27:18 +05:30

46 lines
956 B
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
poetry-core,
pyasn1,
pytestCheckHook,
pythonOlder,
}:
buildPythonPackage rec {
pname = "rsa";
version = "4.9";
format = "pyproject";
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "sybrenstuvel";
repo = "python-rsa";
rev = "version-${version}";
hash = "sha256-PwaRe+ICy0UoguXSMSh3PFl5R+YAhJwNdNN9isadlJY=";
};
preConfigure = lib.optionalString (pythonOlder "3.7") ''
substituteInPlace setup.py --replace "open('README.md')" "open('README.md',encoding='utf-8')"
'';
nativeBuildInputs = [ poetry-core ];
propagatedBuildInputs = [ pyasn1 ];
preCheck = ''
sed -i '/addopts/d' tox.ini
'';
nativeCheckInputs = [ pytestCheckHook ];
disabledTestPaths = [ "tests/test_mypy.py" ];
meta = with lib; {
homepage = "https://stuvel.eu/rsa";
license = licenses.asl20;
description = "Pure-Python RSA implementation";
};
}