Unverified Commit 9e2fc32c authored by Emily's avatar Emily Committed by GitHub
Browse files

Merge pull request #331838 from pyrox0/denose/mohawk

python312Packages.mohawk: drop nose dependency; modernize
parents 64c6a82f e3607cab
Loading
Loading
Loading
Loading
+19 −14
Original line number Diff line number Diff line
@@ -2,33 +2,38 @@
  lib,
  buildPythonPackage,
  fetchPypi,
  mock,
  nose,
  pytest,
  fetchpatch2,
  pytestCheckHook,
  six,
  setuptools,
}:

buildPythonPackage rec {
  pname = "mohawk";
  version = "1.1.0";
  format = "setuptools";
  pyproject = true;

  src = fetchPypi {
    inherit pname version;
    sha256 = "08wppsv65yd0gdxy5zwq37yp6jmxakfz4a2yx5wwq2d222my786j";
    hash = "sha256-0qDjqxCiCcx56V4o8t1UvUpz/RmY/+J7e6D5Yra+lyM=";
  };

  propagatedBuildInputs = [ six ];

  nativeCheckInputs = [
    mock
    nose
    pytest
  patches = [
    (fetchpatch2 {
      # https://github.com/kumar303/mohawk/pull/59
      name = "nose-to-pytest.patch";
      url = "https://github.com/kumar303/mohawk/compare/b7899166880e890f01cf2531b5686094ba08df8f...66157c7efbf6b0d18c30a9ffe5dfd84bef27bd3a.patch";
      hash = "sha256-w3sP5XeBqOwoPGsWzYET4djYwuKPaS4OOlC3HBPD0NI=";
    })
  ];

  checkPhase = ''
    pytest mohawk/tests.py
  '';
  build-system = [ setuptools ];

  dependencies = [ six ];

  nativeCheckInputs = [ pytestCheckHook ];

  pytestFlagsArray = [ "mohawk/tests.py" ];

  meta = {
    description = "Python library for Hawk HTTP authorization";