python3Packages.bcrypt: 4.3.0 -> 5.0.0, adopt (#447841)

This commit is contained in:
dotlambda
2025-10-10 21:40:55 +02:00
committed by GitHub
2 changed files with 28 additions and 21 deletions
@@ -5,12 +5,9 @@
rustPlatform,
rustc,
setuptools,
setuptoolsRustBuildHook,
fetchPypi,
pythonOlder,
setuptools-rust,
fetchFromGitHub,
pytestCheckHook,
libiconv,
stdenv,
# for passthru.tests
asyncssh,
django_4,
@@ -21,14 +18,14 @@
buildPythonPackage rec {
pname = "bcrypt";
version = "4.3.0";
format = "pyproject";
version = "5.0.0";
pyproject = true;
disabled = pythonOlder "3.6";
src = fetchPypi {
inherit pname version;
hash = "sha256-Oj/SIEF4ttKtzwnLT2Qm/+9UdiV3p8m1TBWQCMsojBg=";
src = fetchFromGitHub {
owner = "pyca";
repo = "bcrypt";
tag = version;
hash = "sha256-7Dp07xoq6h+fiP7d7/TRRoYszWsyQF1c4vuFUpZ7u6U=";
};
cargoRoot = "src/_bcrypt";
@@ -39,20 +36,20 @@ buildPythonPackage rec {
src
cargoRoot
;
hash = "sha256-HgHvfMBspPsSYhllnKBg5XZB6zxFIqJj+4//xKG8HwA=";
hash = "sha256-hYMJlwxnXA0ZOJiyZ8rDp9govVcc1SGkDfqUVngnUPQ=";
};
nativeBuildInputs = [
build-system = [
setuptools
setuptoolsRustBuildHook
setuptools-rust
];
nativeBuildInputs = [
rustPlatform.cargoSetupHook
cargo
rustc
];
# Remove when https://github.com/NixOS/nixpkgs/pull/190093 lands.
buildInputs = lib.optional stdenv.hostPlatform.isDarwin libiconv;
nativeCheckInputs = [ pytestCheckHook ];
pythonImportsCheck = [ "bcrypt" ];
@@ -67,10 +64,11 @@ buildPythonPackage rec {
;
};
meta = with lib; {
meta = {
changelog = "https://github.com/pyca/bcrypt/blob/${src.tag}/CHANGELOG.rst";
description = "Modern password hashing for your software and your servers";
homepage = "https://github.com/pyca/bcrypt/";
license = licenses.asl20;
maintainers = [ ];
license = lib.licenses.asl20;
maintainers = [ lib.maintainers.dotlambda ];
};
}
@@ -41,6 +41,15 @@ buildPythonPackage rec {
pythonImportsCheck = [ "passlib" ];
disabledTestPaths = [
# https://github.com/notypecheck/passlib/issues/18
"tests/test_handlers_bcrypt.py::bcrypt_bcrypt_test::test_70_hashes"
"tests/test_handlers_bcrypt.py::bcrypt_bcrypt_test::test_77_fuzz_input"
"tests/test_handlers_django.py::django_bcrypt_test::test_77_fuzz_input"
"tests/test_handlers_bcrypt.py::bcrypt_bcrypt_test::test_secret_w_truncate_size"
"tests/test_handlers_django.py::django_bcrypt_test::test_secret_w_truncate_size"
];
disabledTests = [
# timming sensitive
"test_dummy_verify"