diff --git a/pkgs/development/python-modules/birch/default.nix b/pkgs/development/python-modules/birch/default.nix new file mode 100644 index 000000000000..3afd6d3df06a --- /dev/null +++ b/pkgs/development/python-modules/birch/default.nix @@ -0,0 +1,60 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, setuptools +, strct +, pytestCheckHook +, pyyaml +}: + +buildPythonPackage rec { + pname = "birch"; + version = "0.0.35"; + pyproject = true; + + src = fetchFromGitHub { + owner = "shaypal5"; + repo = "birch"; + rev = "v${version}"; + hash = "sha256-KdQZzQJvJ+logpcLQfaqqEEZJ/9VmNTQX/a4v0oBC98="; + }; + + postPatch = '' + substituteInPlace pytest.ini \ + --replace \ + "--cov" \ + "#--cov" + ''; + + nativeBuildInputs = [ + setuptools + ]; + + propagatedBuildInputs = [ + strct + ]; + + pythonImportsCheck = [ + "birch" + "birch.casters" + "birch.exceptions" + "birch.paths" + ]; + + nativeCheckInputs = [ + pytestCheckHook + pyyaml + ]; + + preCheck = '' + export HOME="$(mktemp -d)" + ''; + + + meta = with lib; { + description = "Simple hierarchical configuration for Python packages"; + homepage = "https://github.com/shaypal5/birch"; + license = licenses.mit; + maintainers = with maintainers; [ pbsds ]; + }; +} diff --git a/pkgs/development/python-modules/cachier/default.nix b/pkgs/development/python-modules/cachier/default.nix index 2a1fe461d51c..28159a16454c 100644 --- a/pkgs/development/python-modules/cachier/default.nix +++ b/pkgs/development/python-modules/cachier/default.nix @@ -1,29 +1,31 @@ { lib , buildPythonPackage , pythonOlder -, fetchPypi +, fetchFromGitHub , pythonRelaxDepsHook , setuptools , watchdog , portalocker -, pathtools , pytestCheckHook , pymongo , dnspython , pymongo-inmemory , pandas +, birch }: buildPythonPackage rec { pname = "cachier"; - version = "2.2.1"; - format = "setuptools"; + version = "2.2.2"; + pyproject = true; disabled = pythonOlder "3.8"; - src = fetchPypi { - inherit pname version; - hash = "sha256-nm98LT87Z7yErKvIqMp93OEX9TDojqqtItgryHgSQJQ="; + src = fetchFromGitHub { + owner = "python-cachier"; + repo = "cachier"; + rev = "v${version}"; + hash = "sha256-zUZqT4SIwZRqhRS/wHIzIYVULnp5aYcytCQd17T0D/4="; }; pythonRemoveDeps = [ "setuptools" ]; @@ -36,7 +38,6 @@ buildPythonPackage rec { propagatedBuildInputs = [ watchdog portalocker - pathtools ]; preCheck = '' @@ -52,6 +53,7 @@ buildPythonPackage rec { dnspython pymongo-inmemory pandas + birch ]; disabledTests = [ diff --git a/pkgs/development/python-modules/strct/default.nix b/pkgs/development/python-modules/strct/default.nix new file mode 100644 index 000000000000..7244002d4169 --- /dev/null +++ b/pkgs/development/python-modules/strct/default.nix @@ -0,0 +1,52 @@ +{ lib +, fetchFromGitHub +, buildPythonPackage +, setuptools +, pytestCheckHook +, sortedcontainers +}: + +buildPythonPackage rec { + pname = "strct"; + version = "0.0.32"; + pyproject = true; + + src = fetchFromGitHub { + owner = "shaypal5"; + repo = "strct"; + rev = "v${version}"; + hash = "sha256-ctafvdfSOdp7tlCUYg7d5XTXR1qBcWvOVtGtNUnhYIw="; + }; + + postPatch = '' + substituteInPlace pytest.ini \ + --replace \ + "--cov" \ + "#--cov" + ''; + + nativeBuildInputs = [ + setuptools + ]; + + nativeCheckInputs = [ + pytestCheckHook + sortedcontainers + ]; + + pythonImportsCheck = [ + "strct" + "strct.dicts" + "strct.hash" + "strct.lists" + "strct.sets" + "strct.sortedlists" + ]; + + meta = with lib; { + description = "A small pure-python package for data structure related utility functions"; + homepage = "https://github.com/shaypal5/strct"; + license = licenses.mit; + maintainers = with maintainers; [ pbsds ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 021640390341..b00707ff4ad1 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1482,6 +1482,8 @@ self: super: with self; { bip32 = callPackage ../development/python-modules/bip32 { }; + birch = callPackage ../development/python-modules/birch { }; + bitarray = callPackage ../development/python-modules/bitarray { }; bitbox02 = callPackage ../development/python-modules/bitbox02 { }; @@ -13792,6 +13794,8 @@ self: super: with self; { strawberry-graphql = callPackage ../development/python-modules/strawberry-graphql { }; + strct = callPackage ../development/python-modules/strct { }; + streamdeck = callPackage ../development/python-modules/streamdeck { }; streaming-form-data = callPackage ../development/python-modules/streaming-form-data { };