summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/ruyaml/default.nix
blob: a2f24b793071c772f3e10d8c7992f843b4a1c91b (plain)
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
{
  lib,
  buildPythonPackage,
  distro,
  fetchFromGitHub,
  pytestCheckHook,
  setuptools-scm,
}:

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

  src = fetchFromGitHub {
    owner = "pycontribs";
    repo = "ruyaml";
    tag = "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 ];

  pytestFlags = [
    "-Wignore::DeprecationWarning"
  ];

  pythonImportsCheck = [ "ruyaml" ];

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

  meta = {
    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 lib.licenses; [ mit ];
    maintainers = with lib.maintainers; [ fab ];
  };
}