Commit 8f39ebba authored by Fabian Affolter's avatar Fabian Affolter
Browse files

python310Packages.karton-classifier: 1.3.0 -> 1.4.0

parent 5c953fb7
Loading
Loading
Loading
Loading
+14 −5
Original line number Diff line number Diff line
@@ -10,7 +10,8 @@

buildPythonPackage rec {
  pname = "karton-classifier";
  version = "1.2.0";
  version = "1.4.0";
  format = "setuptools";

  disabled = pythonOlder "3.7";

@@ -18,7 +19,7 @@ buildPythonPackage rec {
    owner = "CERT-Polska";
    repo = pname;
    rev = "v${version}";
    sha256 = "sha256-AG2CtNMgXYfbdlOqB1ZdjMT8H67fsSMXTgiFg6K41IQ=";
    hash = "sha256-TRmAin0TAOIwR5EBMwTOJ9QaHO+mOx/eAjgqvyQZDj4=";
  };

  propagatedBuildInputs = [
@@ -27,17 +28,25 @@ buildPythonPackage rec {
    python-magic
  ];

  checkInputs = [
    pytestCheckHook
  ];

  postPatch = ''
    substituteInPlace requirements.txt \
      --replace "chardet==3.0.4" "chardet" \
      --replace "python-magic==0.4.18" "python-magic"
  '';

  checkInputs = [
    pytestCheckHook
  pythonImportsCheck = [
    "karton.classifier"
  ];

  pythonImportsCheck = [ "karton.classifier" ];
  disabledTests = [
    # Tests expecting results from a different version of libmagic
    "test_process_archive_ace"
    "test_process_runnable_win32_lnk"
  ];

  meta = with lib; {
    description = "File type classifier for the Karton framework";