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

Merge pull request #297653 from fabaff/maya-fix

python312Packages.maya: disable failing tests
parents 1b54a5cb 7370c06e
Loading
Loading
Loading
Loading
+26 −16
Original line number Diff line number Diff line
{ lib
, fetchFromGitHub
, buildPythonPackage

# build-system
, setuptools

# dependencies
, dateparser
, fetchFromGitHub
, freezegun
, humanize
, tzlocal
, pendulum
, snaptime
, pytz

# tests
, freezegun
, pytest-mock
, pytestCheckHook
, pythonOlder
, pytz
, setuptools
, snaptime
, tzlocal
}:

buildPythonPackage rec {
  pname = "maya";
  version = "0.6.1";
  format = "pyproject";
  pyproject = true;

  disabled = pythonOlder "3.7";

  src = fetchFromGitHub {
    owner = "kennethreitz";
    owner = "timofurrer";
    repo = "maya";
    rev = "refs/tags/v${version}";
    hash = "sha256-4fUyUqVQk/AcQL3xMnU1cQlF5yiD/N9NPAsUPuDTTNY=";
@@ -33,7 +31,7 @@ buildPythonPackage rec {
  postPatch = ''
    # function was made private in humanize
    substituteInPlace maya/core.py \
      --replace "humanize.time.abs_timedelta" "humanize.time._abs_timedelta"
      --replace-fail "humanize.time.abs_timedelta" "humanize.time._abs_timedelta"
  '';

  nativeBuildInputs = [
@@ -51,12 +49,24 @@ buildPythonPackage rec {

  nativeCheckInputs = [
    freezegun
    pytest-mock
    pytestCheckHook
  ];

  pythonImportsCheck = [
    "maya"
  ];

  disabledTests = [
    # https://github.com/timofurrer/maya/issues/202
    "test_parse_iso8601"
  ];

  meta = with lib; {
    description = "Datetimes for Humans";
    homepage = "https://github.com/kennethreitz/maya";
    homepage = "https://github.com/timofurrer/maya";
    changelog = "https://github.com/timofurrer/maya/releases/tag/v${version}";
    license = licenses.mit;
    maintainers = with maintainers; [ ];
  };
}