1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pythonOlder,
6 pybind11,
7 pytestCheckHook,
8 python-dateutil,
9 doxygen,
10 python,
11 pelican,
12 matplotlib,
13}:
14
15buildPythonPackage rec {
16 pname = "pytomlpp";
17 version = "1.0.14";
18 format = "setuptools";
19
20 src = fetchFromGitHub {
21 owner = "bobfang1992";
22 repo = "pytomlpp";
23 rev = "v${version}";
24 fetchSubmodules = true;
25 hash = "sha256-P41jEs1ShpiuSenreE4ykesY2wgBaR7TUKuv3tcD5J0=";
26 };
27
28 buildInputs = [ pybind11 ];
29
30 nativeCheckInputs = [
31 pytestCheckHook
32
33 python-dateutil
34 doxygen
35 python
36 pelican
37 matplotlib
38 ];
39
40 # pelican requires > 2.7
41 doCheck = !pythonOlder "3.6";
42
43 disabledTests = [
44 # incompatible with pytest7
45 # https://github.com/bobfang1992/pytomlpp/issues/66
46 "test_loads_valid_toml_files"
47 "test_round_trip_for_valid_toml_files"
48 "test_decode_encode_binary"
49 ];
50
51 preCheck = ''
52 cd tests
53 '';
54
55 pythonImportsCheck = [ "pytomlpp" ];
56
57 meta = with lib; {
58 description = "Python wrapper for tomlplusplus";
59 homepage = "https://github.com/bobfang1992/pytomlpp";
60 license = licenses.mit;
61 maintainers = with maintainers; [ evils ];
62 };
63}