mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-02 02:53:55 +00:00
python3Packages.argon2-cffi-bindings: use system libargon2
argon2-cffi-bindings uses a vendored copy of libargon2 by default, but can be configured to use a system installation. This reduces the output size avoids issues with the build system mistakenly trying to use SSE2 on non-x86 platforms when cross-compiling.
This commit is contained in:
parent
805576cd9b
commit
b55e27cc5c
@ -1,6 +1,7 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, libargon2
|
||||
, cffi
|
||||
, setuptools-scm
|
||||
}:
|
||||
@ -14,6 +15,8 @@ buildPythonPackage rec {
|
||||
sha256 = "bb89ceffa6c791807d1305ceb77dbfacc5aa499891d2c55661c6459651fc39e3";
|
||||
};
|
||||
|
||||
buildInputs = [ libargon2 ];
|
||||
|
||||
nativeBuildInputs = [
|
||||
setuptools-scm
|
||||
cffi
|
||||
@ -23,6 +26,8 @@ buildPythonPackage rec {
|
||||
cffi
|
||||
];
|
||||
|
||||
env.ARGON2_CFFI_USE_SYSTEM = 1;
|
||||
|
||||
# tarball doesn't include tests, but the upstream tests are minimal
|
||||
doCheck = false;
|
||||
pythonImportsCheck = [ "_argon2_cffi_bindings" ];
|
||||
|
@ -29,8 +29,6 @@ buildPythonPackage rec {
|
||||
propagatedBuildInputs = [ six argon2-cffi-bindings ]
|
||||
++ lib.optional (!isPy3k) enum34;
|
||||
|
||||
ARGON2_CFFI_USE_SSE2 = lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) "0";
|
||||
|
||||
nativeCheckInputs = [ hypothesis pytest wheel ];
|
||||
checkPhase = ''
|
||||
pytest tests
|
||||
|
Loading…
Reference in New Issue
Block a user