about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBen Wolsieffer <benwolsieffer@gmail.com>2023-09-01 13:53:40 -0400
committerBen Wolsieffer <benwolsieffer@gmail.com>2023-09-25 21:27:06 -0400
commit805576cd9ba841be85066569c3bae7165402855c (patch)
treea70e9f6f2522c5c600bb86ac3701299c2a2fe0ff
parentf81d859a240d81ca0eda0dc05f81b1a2f0b5c582 (diff)
python3Packages.argon2-cffi: remove unnecessary cffi dependencies
argon2-cffi-bindings needs cffi at build time and run time, therefore it has
cffi in nativeBuildInputs and propagatedBuildInputs. argon2-cffi doesn't
directly use cffi, only transitively through argon2-cffi-bindings. This also
removes a problematic usage of propagatedNativeBuildInputs.

Also, add pythonImportsCheck to verify that we have all the necessary
dependencies.
-rw-r--r--pkgs/development/python-modules/argon2-cffi-bindings/default.nix1
-rw-r--r--pkgs/development/python-modules/argon2-cffi/default.nix12
2 files changed, 5 insertions, 8 deletions
diff --git a/pkgs/development/python-modules/argon2-cffi-bindings/default.nix b/pkgs/development/python-modules/argon2-cffi-bindings/default.nix
index 3f1f3f86666cf..1dc4337e26e68 100644
--- a/pkgs/development/python-modules/argon2-cffi-bindings/default.nix
+++ b/pkgs/development/python-modules/argon2-cffi-bindings/default.nix
@@ -16,6 +16,7 @@ buildPythonPackage rec {
 
   nativeBuildInputs = [
     setuptools-scm
+    cffi
   ];
 
   propagatedBuildInputs = [
diff --git a/pkgs/development/python-modules/argon2-cffi/default.nix b/pkgs/development/python-modules/argon2-cffi/default.nix
index 2282a06e5c646..0521efc444cdf 100644
--- a/pkgs/development/python-modules/argon2-cffi/default.nix
+++ b/pkgs/development/python-modules/argon2-cffi/default.nix
@@ -1,5 +1,4 @@
-{ cffi
-, six
+{ six
 , enum34
 , hypothesis
 , pytest
@@ -27,14 +26,9 @@ buildPythonPackage rec {
     flit-core
   ];
 
-  propagatedBuildInputs = [ cffi six argon2-cffi-bindings ]
+  propagatedBuildInputs = [ six argon2-cffi-bindings ]
     ++ lib.optional (!isPy3k) enum34;
 
-  propagatedNativeBuildInputs = [
-    argon2-cffi-bindings
-    cffi
-  ];
-
   ARGON2_CFFI_USE_SSE2 = lib.optionals (stdenv.hostPlatform != stdenv.buildPlatform) "0";
 
   nativeCheckInputs = [ hypothesis pytest wheel ];
@@ -42,6 +36,8 @@ buildPythonPackage rec {
     pytest tests
   '';
 
+  pythonImportsCheck = [ "argon2" ];
+
   meta = with lib; {
     description = "Secure Password Hashes for Python";
     homepage    = "https://argon2-cffi.readthedocs.io/";