diff options
author | Michael Weiss <dev.primeos@gmail.com> | 2021-02-08 14:07:11 +0100 |
---|---|---|
committer | Daniƫl de Kok <me@danieldk.eu> | 2021-02-10 07:03:40 +0100 |
commit | da73f94622f309b13230c50c0ec93c22c705c4ba (patch) | |
tree | a929458d222e0e36821b52236a8deeebf65a8cca /pkgs/development/python-modules/cryptography | |
parent | 4a4da22674b0808a85604d72db41adb9bc2de1a5 (diff) |
python3Packages.cryptography: 3.3.2 -> 3.4.2
Backwards incompatible changes: Support for Python 2 has been removed. Note: This isn't a problem for Nixpkgs because pythonPackages.cryptography is frozen at version 3.3.2. Other important packaging changes: "Cryptography now incorporates Rust code. Users building cryptography themselves will need to have the Rust toolchain installed. Users who use an officially produced wheel will not need to make any changes. The minimum supported Rust version is 1.45.0."
Diffstat (limited to 'pkgs/development/python-modules/cryptography')
-rw-r--r-- | pkgs/development/python-modules/cryptography/default.nix | 26 | ||||
-rw-r--r-- | pkgs/development/python-modules/cryptography/vectors.nix | 2 |
2 files changed, 19 insertions, 9 deletions
diff --git a/pkgs/development/python-modules/cryptography/default.nix b/pkgs/development/python-modules/cryptography/default.nix index eb4eba0f5879e..d64f4a9792bf4 100644 --- a/pkgs/development/python-modules/cryptography/default.nix +++ b/pkgs/development/python-modules/cryptography/default.nix @@ -2,8 +2,8 @@ , buildPythonPackage , fetchPypi , fetchpatch -, isPy27 -, ipaddress +, rustPlatform +, setuptools-rust , openssl , cryptography_vectors , darwin @@ -13,27 +13,38 @@ , isPyPy , cffi , pytest +, pytest-subtests , pretend , iso8601 , pytz , hypothesis -, enum34 }: buildPythonPackage rec { pname = "cryptography"; - version = "3.3.2"; # Also update the hash in vectors.nix + version = "3.4.2"; # Also update the hash in vectors.nix src = fetchPypi { inherit pname version; - sha256 = "1vcvw4lkw1spiq322pm1256kail8nck6bbgpdxx3pqa905wd6q2s"; + sha256 = "1i1mx5y9hkyfi9jrrkcw804hmkcglxi6rmf7vin7jfnbr2bf4q64"; }; + cargoDeps = rustPlatform.fetchCargoTarball { + inherit src; + sourceRoot = "${pname}-${version}/${cargoRoot}"; + name = "${pname}-${version}"; + hash = "sha256-PS562W4L1NimqDV2H0jl5vYhL08H9est/pbIxSdYVfo="; + }; + + cargoRoot = "src/rust"; + outputs = [ "out" "dev" ]; nativeBuildInputs = lib.optionals (!isPyPy) [ cffi - ]; + rustPlatform.cargoSetupHook + setuptools-rust + ] ++ (with rustPlatform; [ rust.cargo rust.rustc ]); buildInputs = [ openssl ] ++ lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.Security; @@ -42,8 +53,6 @@ buildPythonPackage rec { six ] ++ lib.optionals (!isPyPy) [ cffi - ] ++ lib.optionals isPy27 [ - ipaddress enum34 ]; checkInputs = [ @@ -52,6 +61,7 @@ buildPythonPackage rec { iso8601 pretend pytest + pytest-subtests pytz ]; diff --git a/pkgs/development/python-modules/cryptography/vectors.nix b/pkgs/development/python-modules/cryptography/vectors.nix index f9b7c525237ab..16151a8412423 100644 --- a/pkgs/development/python-modules/cryptography/vectors.nix +++ b/pkgs/development/python-modules/cryptography/vectors.nix @@ -7,7 +7,7 @@ buildPythonPackage rec { src = fetchPypi { inherit pname version; - sha256 = "1yhaps0f3h2yjb6lmz953z1l1d84y9swk4k3gj9nqyk4vbx5m7cc"; + sha256 = "0i888rrfn7116lj7f2nr4amd2z45sk6866zizjfpsn5wh2713cls"; }; # No tests included |