diff options
author | Peder Bergebakken Sundt <pbsds@hotmail.com> | 2023-09-09 16:30:53 +0200 |
---|---|---|
committer | Peder Bergebakken Sundt <pbsds@hotmail.com> | 2023-09-11 21:47:47 +0200 |
commit | 0996a248c55eefb4431f38dc54815eb6dc40fed9 (patch) | |
tree | 6ab1f87573a6033bcec1c034e198ba982e2f7824 /pkgs/development/python-modules/cachier | |
parent | d13e942758a6a1571dee59b32fe3d60651626342 (diff) |
python3Packages.cachier: init at 2.2.1
Diffstat (limited to 'pkgs/development/python-modules/cachier')
-rw-r--r-- | pkgs/development/python-modules/cachier/default.nix | 87 |
1 files changed, 87 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/cachier/default.nix b/pkgs/development/python-modules/cachier/default.nix new file mode 100644 index 0000000000000..2a1fe461d51ca --- /dev/null +++ b/pkgs/development/python-modules/cachier/default.nix @@ -0,0 +1,87 @@ +{ lib +, buildPythonPackage +, pythonOlder +, fetchPypi +, pythonRelaxDepsHook +, setuptools +, watchdog +, portalocker +, pathtools +, pytestCheckHook +, pymongo +, dnspython +, pymongo-inmemory +, pandas +}: + +buildPythonPackage rec { + pname = "cachier"; + version = "2.2.1"; + format = "setuptools"; + + disabled = pythonOlder "3.8"; + + src = fetchPypi { + inherit pname version; + hash = "sha256-nm98LT87Z7yErKvIqMp93OEX9TDojqqtItgryHgSQJQ="; + }; + + pythonRemoveDeps = [ "setuptools" ]; + + nativeBuildInputs = [ + pythonRelaxDepsHook + setuptools + ]; + + propagatedBuildInputs = [ + watchdog + portalocker + pathtools + ]; + + preCheck = '' + substituteInPlace pytest.ini \ + --replace \ + "--cov" \ + "#--cov" + ''; + + nativeCheckInputs = [ + pytestCheckHook + pymongo + dnspython + pymongo-inmemory + pandas + ]; + + disabledTests = [ + # touches network + "test_mongetter_default_param" + "test_stale_after_applies_dynamically" + "test_next_time_applies_dynamically" + "test_wait_for_calc_" + "test_precache_value" + "test_ignore_self_in_methods" + "test_mongo_index_creation" + "test_mongo_core" + + # don't test formatting + "test_flake8" + ]; + + preBuild = '' + export HOME="$(mktemp -d)" + ''; + + pythonImportsCheck = [ + "cachier" + "cachier.scripts" + ]; + + meta = { + homepage = "https://github.com/python-cachier/cachier"; + description = "Persistent, stale-free, local and cross-machine caching for functions"; + maintainers = with lib.maintainers; [ pbsds ]; + license = lib.licenses.mit; + }; +} |