Merge pull request #252834 from lopsided98/argon2-cffi-update

python3Packages.argon2-cffi: 21.3.0 -> 23.1.0, cleanup
This commit is contained in:
OTABI Tomoya
2023-09-26 12:43:23 +09:00
committed by GitHub
2 changed files with 19 additions and 27 deletions
@@ -1,6 +1,7 @@
{ lib
, buildPythonPackage
, fetchPypi
, libargon2
, cffi
, setuptools-scm
}:
@@ -14,14 +15,19 @@ buildPythonPackage rec {
sha256 = "bb89ceffa6c791807d1305ceb77dbfacc5aa499891d2c55661c6459651fc39e3";
};
buildInputs = [ libargon2 ];
nativeBuildInputs = [
setuptools-scm
cffi
];
propagatedBuildInputs = [
cffi
];
env.ARGON2_CFFI_USE_SYSTEM = 1;
# tarball doesn't include tests, but the upstream tests are minimal
doCheck = false;
pythonImportsCheck = [ "_argon2_cffi_bindings" ];
@@ -1,46 +1,32 @@
{ cffi
, six
, enum34
, hypothesis
, pytest
, wheel
{ hypothesis
, pytestCheckHook
, buildPythonPackage
, fetchPypi
, flit-core
, isPy3k
, lib
, stdenv
, hatchling
, hatch-vcs
, hatch-fancy-pypi-readme
, argon2-cffi-bindings
}:
buildPythonPackage rec {
pname = "argon2-cffi";
version = "21.3.0";
version = "23.1.0";
format = "pyproject";
src = fetchPypi {
inherit pname version;
sha256 = "d384164d944190a7dd7ef22c6aa3ff197da12962bd04b17f64d4e93d934dba5b";
pname = "argon2_cffi";
inherit version;
hash = "sha256-h5w+eaJynOdo67fTbUYJ46eKTKLsOp8SKGygV+PQ2wg=";
};
nativeBuildInputs = [
flit-core
];
nativeBuildInputs = [ hatchling hatch-vcs hatch-fancy-pypi-readme ];
propagatedBuildInputs = [ cffi six argon2-cffi-bindings ]
++ lib.optional (!isPy3k) enum34;
propagatedBuildInputs = [ argon2-cffi-bindings ];
propagatedNativeBuildInputs = [
argon2-cffi-bindings
cffi
];
nativeCheckInputs = [ hypothesis pytestCheckHook ];
ARGON2_CFFI_USE_SSE2 = lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) "0";
nativeCheckInputs = [ hypothesis pytest wheel ];
checkPhase = ''
pytest tests
'';
pythonImportsCheck = [ "argon2" ];
meta = with lib; {
description = "Secure Password Hashes for Python";