1{
2 lib,
3 buildPythonPackage,
4 distro,
5 fetchFromGitHub,
6 fetchpatch,
7 pytestCheckHook,
8 pythonOlder,
9 setuptools-scm,
10}:
11
12buildPythonPackage rec {
13 pname = "ruyaml";
14 version = "0.91.0";
15 pyproject = true;
16
17 disabled = pythonOlder "3.6";
18
19 src = fetchFromGitHub {
20 owner = "pycontribs";
21 repo = "ruyaml";
22 rev = "refs/tags/v${version}";
23 hash = "sha256-A37L/voBrn2aZ7xT8+bWdZJxbWRjnxbstQtSyUeN1sA=";
24 };
25
26 postPatch = ''
27 # https://github.com/pycontribs/ruyaml/pull/107
28 substituteInPlace pyproject.toml \
29 --replace '"pip >= 19.3.1",' "" \
30 --replace '"setuptools_scm_git_archive >= 1.1",' ""
31 '';
32
33 nativeBuildInputs = [ setuptools-scm ];
34
35 propagatedBuildInputs = [ distro ];
36
37 nativeCheckInputs = [ pytestCheckHook ];
38
39 pytestFlagsArray = [
40 "-W"
41 "ignore::DeprecationWarning"
42 ];
43
44 pythonImportsCheck = [ "ruyaml" ];
45
46 disabledTests = [
47 # Assertion error
48 "test_issue_60"
49 "test_issue_60_1"
50 "test_issue_61"
51 ];
52
53 meta = with lib; {
54 description = "YAML 1.2 loader/dumper package for Python";
55 homepage = "https://ruyaml.readthedocs.io/";
56 changelog = "https://github.com/pycontribs/ruyaml/releases/tag/v${version}";
57 license = with licenses; [ mit ];
58 maintainers = with maintainers; [ fab ];
59 };
60}