From 22714ad6d05756a33219ae7a81fd8629001db3f3 Mon Sep 17 00:00:00 2001 From: Michael Weiss Date: Sat, 2 Mar 2019 10:31:30 +0100 Subject: [PATCH] python37Packages.cryptography: Improve the test vectors integration This should make the management easier. The package cryptography_vectors contains the test vectors for cryptography and should therefore always have the same version. By linking the version of cryptography_vectors to cryptography, this simply cannot be forgotten. --- pkgs/development/python-modules/cryptography/default.nix | 3 +-- .../default.nix => cryptography/vectors.nix} | 6 +++--- pkgs/top-level/python-packages.nix | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) rename pkgs/development/python-modules/{cryptography_vectors/default.nix => cryptography/vectors.nix} (77%) diff --git a/pkgs/development/python-modules/cryptography/default.nix b/pkgs/development/python-modules/cryptography/default.nix index dfbb14eb7e65..5e42774fdd97 100644 --- a/pkgs/development/python-modules/cryptography/default.nix +++ b/pkgs/development/python-modules/cryptography/default.nix @@ -20,9 +20,8 @@ }: buildPythonPackage rec { - # also bump cryptography_vectors pname = "cryptography"; - version = "2.5"; + version = "2.5"; # Also update the hash in vectors.nix src = fetchPypi { inherit pname version; diff --git a/pkgs/development/python-modules/cryptography_vectors/default.nix b/pkgs/development/python-modules/cryptography/vectors.nix similarity index 77% rename from pkgs/development/python-modules/cryptography_vectors/default.nix rename to pkgs/development/python-modules/cryptography/vectors.nix index f02a986ec023..86b16586f684 100644 --- a/pkgs/development/python-modules/cryptography_vectors/default.nix +++ b/pkgs/development/python-modules/cryptography/vectors.nix @@ -1,9 +1,9 @@ -{ buildPythonPackage, fetchPypi, lib }: +{ buildPythonPackage, fetchPypi, lib, cryptography }: buildPythonPackage rec { - # also bump cryptography pname = "cryptography_vectors"; - version = "2.5"; + # The test vectors must have the same version as the cryptography package: + version = cryptography.version; src = fetchPypi { inherit pname version; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index eb53f2dd5e02..0b7002cfe345 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1481,7 +1481,7 @@ in { cryptography = callPackage ../development/python-modules/cryptography { }; - cryptography_vectors = callPackage ../development/python-modules/cryptography_vectors { }; + cryptography_vectors = callPackage ../development/python-modules/cryptography/vectors.nix { }; curtsies = callPackage ../development/python-modules/curtsies { };