python312Packages.pybrowserid: fix tests, refactor

This commit is contained in:
TomaSajt
2024-05-11 20:30:35 +02:00
parent b5948e16fc
commit 31bfa34aef
@@ -1,24 +1,44 @@
{ lib, buildPythonPackage, fetchPypi
, requests, mock }:
{
lib,
buildPythonPackage,
fetchPypi,
setuptools,
requests,
unittestCheckHook,
mock,
}:
buildPythonPackage rec {
pname = "pybrowserid";
version = "0.14.0";
pyproject = true;
src = fetchPypi {
pname = "PyBrowserID";
inherit version;
sha256 = "1qvi79kfb8x9kxkm5lw2mp42hm82cpps1xknmsb5ghkwx1lpc8kc";
hash = "sha256-bCJ2aeh8wleWrnb2oO9lAlUoyK2C01Jnn6mj5WY6ceM=";
};
propagatedBuildInputs = [ requests ];
postPatch = ''
substituteInPlace browserid/tests/* \
--replace-warn 'assertEquals' 'assertEqual'
'';
nativeCheckInputs = [ mock ];
build-system = [ setuptools ];
dependencies = [ requests ];
pythonImportsCheck = [ "browserid" ];
nativeCheckInputs = [
unittestCheckHook
mock
];
meta = with lib; {
description = "Python library for the BrowserID Protocol";
homepage = "https://github.com/mozilla/PyBrowserID";
license = licenses.mpl20;
homepage = "https://github.com/mozilla/PyBrowserID";
license = licenses.mpl20;
maintainers = with maintainers; [ ];
};
}