Unverified Commit d05d3577 authored by Fabian Affolter's avatar Fabian Affolter Committed by GitHub
Browse files

Merge pull request #308797 from fabaff/py-zabbix-fix

python312Packages.py-zabbix: disable failing tests on Python 3.12
parents fa5d2cbb e6f807fc
Loading
Loading
Loading
Loading
+19 −12
Original line number Diff line number Diff line
{ lib
, buildPythonPackage
, fetchFromGitHub
, fetchpatch
, pytestCheckHook
, pythonOlder
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  fetchpatch,
  pytestCheckHook,
  pythonAtLeast,
  pythonOlder,
  setuptools,
}:

buildPythonPackage rec {
  pname = "py-zabbix";
  version = "1.1.7";
  format = "setuptools";
  pyproject = true;

  disabled = pythonOlder "3.8";

@@ -29,17 +32,21 @@ buildPythonPackage rec {
    })
  ];

  nativeCheckInputs = [
    pytestCheckHook
  ];
  build-system = [ setuptools ];

  nativeCheckInputs = [ pytestCheckHook ];

  pythonImportsCheck = [ "pyzabbix" ];

  pythonImportsCheck = [
    "pyzabbix"
  disabledTests = lib.optionals (pythonAtLeast "3.12") [
    # AttributeError: 'RawConfigParser' object has no attribute 'readfp'
    "config"
  ];

  meta = with lib; {
    description = "Python module to interact with Zabbix";
    homepage = "https://github.com/adubkov/py-zabbix";
    changelog = "https://github.com/adubkov/py-zabbix/releases/tag/${version}";
    license = licenses.gpl2Only;
    maintainers = with maintainers; [ fab ];
  };