diff --git a/pkgs/development/python-modules/lox/default.nix b/pkgs/development/python-modules/lox/default.nix new file mode 100644 index 0000000000000..84f6dd380b14d --- /dev/null +++ b/pkgs/development/python-modules/lox/default.nix @@ -0,0 +1,68 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pythonOlder +, pytestCheckHook +, sphinxHook +, sphinx-rtd-theme +, pytest-benchmark +, pytest-mock +, py +, pathos +, tqdm +}: + +buildPythonPackage rec { + pname = "lox"; + version = "0.11.0"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "BrianPugh"; + repo = pname; + rev = "v${version}"; + hash = "sha256-kXfFRIFI1OcbDc1LujbFo/Iqg7pgwtXLkIcIFA9nehs="; + }; + + # patch out pytest-runner and invalid pytest args + preBuild = '' + sed -i '/pytest-runner/d' ./setup.py + sed -i '/collect_ignore/d' ./setup.cfg + ''; + + outputs = [ + "out" + "doc" + ]; + + nativeBuildInputs = [ + sphinxHook + sphinx-rtd-theme + ]; + + nativeCheckInputs = [ + py + pytestCheckHook + pytest-benchmark + pytest-mock + ]; + + propagatedBuildInputs = [ + pathos + tqdm + ]; + + pythonImportsCheck = [ + "lox" + ]; + + meta = with lib; { + description = "Threading and Multiprocessing made easy"; + homepage = "https://github.com/BrianPugh/lox"; + changelog = "https://github.com/BrianPugh/lox/releases/tag/v${version}"; + license = licenses.asl20; + maintainers = with maintainers; [ jpetrucciani ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 4e7f2e055eed2..7d0f0d0f063b0 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5674,6 +5674,8 @@ self: super: with self; { losant-rest = callPackage ../development/python-modules/losant-rest { }; + lox = callPackage ../development/python-modules/lox { }; + lrcalc-python = callPackage ../development/python-modules/lrcalc-python { }; lru-dict = callPackage ../development/python-modules/lru-dict { };