Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

python312Packages.{hawkauthlib,pybrowserid}: fix tests, refactor; python312Packages.pyfxa: use pyproject = true #310898

Merged
merged 3 commits into from
May 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
37 changes: 27 additions & 10 deletions pkgs/development/python-modules/hawkauthlib/default.nix
Original file line number Diff line number Diff line change
@@ -1,28 +1,45 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, requests
, webob
{
lib,
buildPythonPackage,
fetchFromGitHub,
setuptools,
requests,
webob,
unittestCheckHook,
}:

buildPythonPackage rec {
pname = "hawkauthlib";
version = "0.1.1";
format = "setuptools";
pyproject = true;

src = fetchFromGitHub {
owner = "mozilla-services";
repo = pname;
repo = "hawkauthlib";
rev = "refs/tags/v${version}";
sha256 = "0mr1mpx4j9q7sch9arwfvpysnpf2p7ijy7072wilxm8pnj0bwvsi";
hash = "sha256-UW++gLQX1U4jFwccL+O5wl2r/d2OZ5Ug0wcnSfqtIVc=";
};

propagatedBuildInputs = [ requests webob ];
postPatch = ''
substituteInPlace hawkauthlib/tests/* \
--replace-warn 'assertEquals' 'assertEqual'
'';

build-system = [ setuptools ];

dependencies = [
requests
webob
];

pythonImportsCheck = [ "hawkauthlib" ];

nativeCheckInputs = [ unittestCheckHook ];

meta = with lib; {
homepage = "https://github.com/mozilla-services/hawkauthlib";
description = "Hawk Access Authentication protocol";
license = licenses.mpl20;
maintainers = with maintainers; [ ];
};

}
34 changes: 27 additions & 7 deletions pkgs/development/python-modules/pybrowserid/default.nix
Original file line number Diff line number Diff line change
@@ -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; [ ];
};
}
8 changes: 6 additions & 2 deletions pkgs/development/python-modules/pyfxa/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
buildPythonPackage rec {
pname = "pyfxa";
version = "0.7.8";
format = "setuptools";
pyproject = true;

disabled = pythonOlder "3.7";

Expand All @@ -28,7 +28,11 @@ buildPythonPackage rec {
hash = "sha256-DMFZl1hbYNaScOTWkAbK2nKti6wD5SS5A30q7TW5vO4=";
};

propagatedBuildInputs = [
build-system = [
setuptools
];

dependencies = [
cryptography
hawkauthlib
pybrowserid
Expand Down