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