about summary refs log tree commit diff
path: root/pkgs/development/python-modules/ruyaml/default.nix
blob: 4131200f2276a554e1e35dccaef76e4e71dc70b9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
{ lib
, buildPythonPackage
, distro
, fetchFromGitHub
, fetchpatch
, pytestCheckHook
, pythonOlder
, setuptools-scm
}:

buildPythonPackage rec {
  pname = "ruyaml";
  version = "0.91.0";
  pyproject = true;

  disabled = pythonOlder "3.6";

  src = fetchFromGitHub {
    owner = "pycontribs";
    repo = "ruyaml";
    rev = "refs/tags/v${version}";
    hash = "sha256-A37L/voBrn2aZ7xT8+bWdZJxbWRjnxbstQtSyUeN1sA=";
  };

  postPatch = ''
    # https://github.com/pycontribs/ruyaml/pull/107
    substituteInPlace pyproject.toml \
      --replace '"pip >= 19.3.1",' "" \
      --replace '"setuptools_scm_git_archive >= 1.1",' ""
  '';

  nativeBuildInputs = [
    setuptools-scm
  ];

  propagatedBuildInputs = [
    distro
  ];

  nativeCheckInputs = [
    pytestCheckHook
  ];

  pytestFlagsArray = [
    "-W" "ignore::DeprecationWarning"
  ];

  pythonImportsCheck = [
    "ruyaml"
  ];

  disabledTests = [
    # Assertion error
    "test_issue_60"
    "test_issue_60_1"
    "test_issue_61"
  ];

  meta = with lib; {
    description = "YAML 1.2 loader/dumper package for Python";
    homepage = "https://ruyaml.readthedocs.io/";
    changelog = "https://github.com/pycontribs/ruyaml/releases/tag/v${version}";
    license = with licenses; [ mit ];
    maintainers = with maintainers; [ fab ];
  };
}