mastodon: 4.3.1 -> 4.3.2 (#361487)
[NixPkgs.git] / pkgs / development / python-modules / cachier / default.nix
blobe040c536c54e71a9cf622f527c3c8af3dcd526cd
2   lib,
3   buildPythonPackage,
4   pythonOlder,
5   fetchFromGitHub,
6   setuptools,
7   click,
8   watchdog,
9   portalocker,
10   pytestCheckHook,
11   pytest-cov-stub,
12   pymongo,
13   dnspython,
14   pymongo-inmemory,
15   pandas,
16   birch,
19 buildPythonPackage rec {
20   pname = "cachier";
21   version = "3.1.2";
22   pyproject = true;
24   disabled = pythonOlder "3.8";
26   src = fetchFromGitHub {
27     owner = "python-cachier";
28     repo = "cachier";
29     rev = "refs/tags/v${version}";
30     hash = "sha256-siighT6hMicN+F/LIXfUAPQ2kkRiyk7CtjqmyC/qCFg=";
31   };
33   pythonRemoveDeps = [ "setuptools" ];
35   nativeBuildInputs = [
36     setuptools
37   ];
39   dependencies = [
40     watchdog
41     portalocker
42     # not listed as dep, but needed to run main script entrypoint
43     click
44   ];
46   nativeCheckInputs = [
47     pytestCheckHook
48     pytest-cov-stub
49     pymongo
50     dnspython
51     pymongo-inmemory
52     pandas
53     birch
54   ];
56   disabledTests = [
57     # touches network
58     "test_mongetter_default_param"
59     "test_stale_after_applies_dynamically"
60     "test_next_time_applies_dynamically"
61     "test_wait_for_calc_"
62     "test_precache_value"
63     "test_ignore_self_in_methods"
64     "test_mongo_index_creation"
65     "test_mongo_core"
67     # don't test formatting
68     "test_flake8"
70     # timing sensitive
71     "test_being_calc_next_time"
72     "test_pickle_being_calculated"
73   ];
75   preBuild = ''
76     export HOME="$(mktemp -d)"
77   '';
79   pythonImportsCheck = [ "cachier" ];
81   meta = {
82     homepage = "https://github.com/python-cachier/cachier";
83     changelog = "https://github.com/python-cachier/cachier/releases/tag/v${version}";
84     description = "Persistent, stale-free, local and cross-machine caching for functions";
85     mainProgram = "cachier";
86     maintainers = with lib.maintainers; [ pbsds ];
87     license = lib.licenses.mit;
88   };