Unverified Commit 809f20b2 authored by Emily's avatar Emily Committed by GitHub
Browse files

Merge pull request #330005 from Sigmanificient/telfhash

python312Packages.telfhash: drop nose dependency
parents b9b0f7e6 3fafc1a3
Loading
Loading
Loading
Loading
+9 −10
Original line number Diff line number Diff line
@@ -6,12 +6,12 @@
  packaging,
  pyelftools,
  tlsh,
  nose,
  setuptools,
}:
buildPythonPackage rec {
  pname = "telfhash";
  version = "0.9.8";
  format = "setuptools";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "trendmicro";
@@ -23,22 +23,21 @@ buildPythonPackage rec {
  # The tlsh library's name is just "tlsh"
  postPatch = ''
    substituteInPlace requirements.txt \
       --replace "python-tlsh" "tlsh" \
       --replace "py-tlsh" "tlsh"
       --replace-fail "python-tlsh" "tlsh" \
       --replace-fail "py-tlsh" "tlsh" \
       --replace-fail "nose>=1.3.7" ""
  '';

  propagatedBuildInputs = [
  build-system = [ setuptools ];

  dependencies = [
    capstone
    pyelftools
    tlsh
    packaging
  ];

  nativeCheckInputs = [ nose ];

  checkPhase = ''
    nosetests
  '';
  doCheck = false; # no tests

  pythonImportsCheck = [ "telfhash" ];