about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorBen Darwin <bcdarwin@gmail.com>2020-03-04 11:59:20 -0500
committerFrederik Rietdijk <freddyrietdijk@fridh.nl>2020-03-14 22:56:38 +0100
commit45d01095128f2ed908ec40c87cca6ee09b43ce88 (patch)
tree84c3ff8fbdd6b1f88a57da19a98a9ce69f85fd0c /pkgs
parent3a2c21dc9508e7e7ffb9fe3125987ee916f7541c (diff)
downloadnixlib-45d01095128f2ed908ec40c87cca6ee09b43ce88.tar
nixlib-45d01095128f2ed908ec40c87cca6ee09b43ce88.tar.gz
nixlib-45d01095128f2ed908ec40c87cca6ee09b43ce88.tar.bz2
nixlib-45d01095128f2ed908ec40c87cca6ee09b43ce88.tar.lz
nixlib-45d01095128f2ed908ec40c87cca6ee09b43ce88.tar.xz
nixlib-45d01095128f2ed908ec40c87cca6ee09b43ce88.tar.zst
nixlib-45d01095128f2ed908ec40c87cca6ee09b43ce88.zip
python3Packages.threadpoolctl: init at 2.0.0
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/python-modules/threadpoolctl/default.nix38
-rw-r--r--pkgs/top-level/python-packages.nix2
2 files changed, 40 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/threadpoolctl/default.nix b/pkgs/development/python-modules/threadpoolctl/default.nix
new file mode 100644
index 000000000000..e57b5c3b1567
--- /dev/null
+++ b/pkgs/development/python-modules/threadpoolctl/default.nix
@@ -0,0 +1,38 @@
+{ lib
+, buildPythonPackage
+, isPy27
+, fetchFromGitHub
+, flit
+, pytest
+, pytestcov
+, numpy
+, scipy
+}:
+
+buildPythonPackage rec {
+  pname = "threadpoolctl";
+  version = "2.0.0";
+
+  disabled = isPy27;
+  format = "flit";
+
+  src = fetchFromGitHub {
+    owner = "joblib";
+    repo = pname;
+    rev = version;
+    sha256 = "16z4n82f004i4l1jw6qrzazda1m6v2yjnpqlp71ipa8mzy9kw7dw";
+  };
+
+  checkInputs = [ pytest pytestcov numpy scipy ];
+
+  checkPhase = "pytest tests -k 'not test_nested_prange_blas'";
+  # cython doesn't get run on the tests when added to nativeBuildInputs, breaking this test
+
+  meta = with lib; {
+    homepage = "https://github.com/joblib/threadpoolctl";
+    description = "Helpers to limit number of threads used in native libraries";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ bcdarwin ];
+  };
+
+}
diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix
index 7f9f28b45392..e1ea2c9d1e09 100644
--- a/pkgs/top-level/python-packages.nix
+++ b/pkgs/top-level/python-packages.nix
@@ -6729,6 +6729,8 @@ in {
 
   threadpool = callPackage ../development/python-modules/threadpool { };
 
+  threadpoolctl = callPackage ../development/python-modules/threadpoolctl { };
+
   rocket-errbot = callPackage ../development/python-modules/rocket-errbot {  };
 
   Yapsy = callPackage ../development/python-modules/yapsy { };