Commit 0996a248 authored by Peder Bergebakken Sundt's avatar Peder Bergebakken Sundt
Browse files

python3Packages.cachier: init at 2.2.1

parent d13e9427
Loading
Loading
Loading
Loading
+87 −0
Original line number Diff line number Diff line
{ 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;
  };
}
+2 −0
Original line number Diff line number Diff line
@@ -1691,6 +1691,8 @@ self: super: with self; {

  cacheyou = callPackage ../development/python-modules/cacheyou { };

  cachier = callPackage ../development/python-modules/cachier { };

  cachy = callPackage ../development/python-modules/cachy { };

  cadquery = callPackage ../development/python-modules/cadquery {