Commit ea547c89 authored by Robert Schütz's avatar Robert Schütz
Browse files

python310Packages.cryptography: don't depend on pytest-benchmark

parent 1bace74c
Loading
Loading
Loading
Loading
+9 −3
Original line number Diff line number Diff line
@@ -13,7 +13,6 @@
, cffi
, pkg-config
, pytestCheckHook
, pytest-benchmark
, pytest-subtests
, pythonOlder
, pretend
@@ -45,6 +44,11 @@ buildPythonPackage rec {
    hash = "sha256-gFfDTc2QWBWHBCycVH1dYlCsWQMVcRZfOBIau+njtDU=";
  };

  postPatch = ''
    substituteInPlace pyproject.toml \
      --replace "--benchmark-disable" ""
  '';

  cargoRoot = "src/rust";

  nativeBuildInputs = lib.optionals (!isPyPy) [
@@ -70,7 +74,6 @@ buildPythonPackage rec {
    pretend
    py
    pytestCheckHook
    pytest-benchmark
    pytest-subtests
    pytz
  ];
@@ -79,7 +82,10 @@ buildPythonPackage rec {
    "--disable-pytest-warnings"
  ];

  disabledTestPaths = lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [
  disabledTestPaths = [
    # save compute time by not running benchmarks
    "tests/bench"
  ] ++ lib.optionals (stdenv.isDarwin && stdenv.isAarch64) [
    # aarch64-darwin forbids W+X memory, but this tests depends on it:
    # * https://cffi.readthedocs.io/en/latest/using.html#callbacks
    "tests/hazmat/backends/test_openssl_memleak.py"