about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/ruyaml/default.nix
blob: e5b2108831df183195342d4b54741028b475ded3 (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
67
{ lib
, buildPythonPackage
, distro
, fetchFromGitHub
, fetchpatch
, pytestCheckHook
, pythonOlder
, setuptools-scm
}:

buildPythonPackage rec {
  pname = "ruyaml";
  version = "0.91.0";
  format = "setuptools";

  disabled = pythonOlder "3.6";

  src = fetchFromGitHub {
    owner = "pycontribs";
    repo = pname;
    rev = "v${version}";
    sha256 = "0gxvwry7n1gczxkjzyfrr3fammllkvnnamja4yln8xrg3n1h89al";
  };

  patches = [
    (fetchpatch {
      name = "remove-setuptools-scm-git-archive-from-setupcfg.patch";
      url = "https://github.com/pycontribs/ruyaml/commit/8922dd826cbb97b29e9826b00fb28a65d584e985.patch";
      includes = [ "setup.cfg" ];
      hash = "sha256-XAsORoPvYRElHswlZ4S377UwuJNCU1JuCz5iyFXoXOQ=";
    })

    # https://github.com/pycontribs/ruyaml/pull/107
    (fetchpatch {
      name = "remove-setuptools-scm-git-archive-from-pyproject.patch";
      url = "https://github.com/pycontribs/ruyaml/commit/4d605bf63f799696c8ba3c1f0a0f505db0ca33ce.patch";
      hash = "sha256-X6HWXBot5ZIo+odoSHhXMb03tgpQfRw/Ze8nFgH43ZI=";
    })
  ];

  nativeBuildInputs = [
    setuptools-scm
  ];

  propagatedBuildInputs = [
    distro
  ];

  nativeCheckInputs = [
    pytestCheckHook
  ];

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

  pythonImportsCheck = [
    "ruyaml"
  ];

  meta = with lib; {
    description = "YAML 1.2 loader/dumper package for Python";
    homepage = "https://ruyaml.readthedocs.io/";
    license = with licenses; [ mit ];
    maintainers = with maintainers; [ fab ];
  };
}