From 73ed2b1a298e8013965e71cbbe4996af77dff6c6 Mon Sep 17 00:00:00 2001 From: Greg Hellings Date: Tue, 30 Jul 2024 17:45:41 -0500 Subject: [PATCH] python312Packages.lox: init at 0.12.0 --- .../python-modules/lox/default.nix | 61 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 63 insertions(+) create mode 100644 pkgs/development/python-modules/lox/default.nix diff --git a/pkgs/development/python-modules/lox/default.nix b/pkgs/development/python-modules/lox/default.nix new file mode 100644 index 000000000000..c22162404997 --- /dev/null +++ b/pkgs/development/python-modules/lox/default.nix @@ -0,0 +1,61 @@ +{ + buildPythonPackage, + fetchFromGitHub, + lib, + + pathos, + pytestCheckHook, + pytest-mock, + setuptools, + tqdm, +}: + +buildPythonPackage rec { + pname = "lox"; + version = "0.12.0"; + pyproject = true; + + src = fetchFromGitHub { + owner = "BrianPugh"; + repo = "lox"; + rev = "refs/tags/v${version}"; + hash = "sha256-Iv3ZdfsvFLU6lhlH1n+eQ+KIrXESsnC1S2lVFnKFV08="; + }; + + build-system = [ setuptools ]; + + dependencies = [ pathos ]; + + pythonRemoveDeps = [ "sphinx-rtd-theme" ]; + + # setup.py requires pytest-runner for setuptools, which is wrong + postPatch = '' + substituteInPlace setup.py --replace-fail '"pytest-runner",' "" + ''; + + pythonImportsCheck = [ "lox" ]; + + disabledTests = [ + # Benchmark, performance testing + "test_perf_lock" + "test_perf_qlock" + + # time sensitive testing + "test_bathroom_example" + "test_RWLock_r" + ]; + + nativeCheckInputs = [ + pytestCheckHook + pytest-mock + tqdm + ]; + + meta = { + description = "Threading and Multiprocessing made easy"; + changelog = "https://github.com/BrianPugh/lox/releases/tag/v${version}"; + homepage = "https://github.com/BrianPugh/lox"; + license = lib.licenses.asl20; + maintainers = [ lib.maintainers.greg ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 0e4c373f8616..47c5e35ca7b9 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -7254,6 +7254,8 @@ self: super: with self; { lottie = callPackage ../development/python-modules/lottie { }; + lox = callPackage ../development/python-modules/lox { }; + lpc-checksum = callPackage ../development/python-modules/lpc-checksum { }; lrcalc-python = callPackage ../development/python-modules/lrcalc-python { };