about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorFabian Affolter <fabian@affolter-engineering.ch>2022-11-02 00:12:32 +0100
committerGitHub <noreply@github.com>2022-11-02 00:12:32 +0100
commit1916141780b555e75bca9d37d53c217721b4a8f3 (patch)
tree07174a373d33d10c8614d8b8476500b894b16a8a /pkgs
parent8326a502725ac011e6f211d49ead19a1691ebc4b (diff)
parent3ba872b85fd62e9dd4b0dc34efd4131f3d9fc08e (diff)
Merge pull request #198848 from fabaff/blis-fix
python310Packages.blis: allow later numpy releases
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/python-modules/blis/default.nix18
-rw-r--r--pkgs/development/python-modules/spacy-transformers/default.nix2
-rw-r--r--pkgs/development/python-modules/spacy/default.nix2
-rw-r--r--pkgs/development/python-modules/thinc/default.nix31
4 files changed, 32 insertions, 21 deletions
diff --git a/pkgs/development/python-modules/blis/default.nix b/pkgs/development/python-modules/blis/default.nix
index c935c3728b014..68351bd829434 100644
--- a/pkgs/development/python-modules/blis/default.nix
+++ b/pkgs/development/python-modules/blis/default.nix
@@ -5,17 +5,27 @@
 , hypothesis
 , numpy
 , pytest
+, pythonOlder
 }:
 
 buildPythonPackage rec {
   pname = "blis";
   version = "0.9.1";
+  format = "setuptools";
+
+  disabled = pythonOlder "3.7";
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "sha256-fOrEZoAfnZfss04Q3e2MJM9eCSfqfoNNocydLtP8Nm8=";
+    hash = "sha256-fOrEZoAfnZfss04Q3e2MJM9eCSfqfoNNocydLtP8Nm8=";
   };
 
+  postPatch = ''
+    # See https://github.com/numpy/numpy/issues/21079
+    substituteInPlace blis/benchmark.py \
+      --replace "numpy.__config__.blas_ilp64_opt_info" "numpy.__config__.blas_opt_info"
+  '';
+
   nativeBuildInputs = [
     cython
   ];
@@ -24,16 +34,20 @@ buildPythonPackage rec {
     numpy
   ];
 
-
   checkInputs = [
     hypothesis
     pytest
   ];
 
+  pythonImportsCheck = [
+    "blis"
+  ];
+
   meta = with lib; {
     description = "BLAS-like linear algebra library";
     homepage = "https://github.com/explosion/cython-blis";
     license = licenses.bsd3;
+    maintainers = with maintainers; [ ];
     platforms = platforms.x86_64;
   };
 }
diff --git a/pkgs/development/python-modules/spacy-transformers/default.nix b/pkgs/development/python-modules/spacy-transformers/default.nix
index f6985a613380b..914e2cb5153e5 100644
--- a/pkgs/development/python-modules/spacy-transformers/default.nix
+++ b/pkgs/development/python-modules/spacy-transformers/default.nix
@@ -35,7 +35,7 @@ buildPythonPackage rec {
 
   postPatch = ''
     substituteInPlace setup.cfg \
-      --replace "transformers>=3.4.0,<4.18.0" "transformers>=3.4.0 # ,<4.18.0"
+      --replace "transformers>=3.4.0,<4.22.0" "transformers>=3.4.0 # ,<4.22.0"
   '';
 
   # Test fails due to missing arguments for trfs2arrays().
diff --git a/pkgs/development/python-modules/spacy/default.nix b/pkgs/development/python-modules/spacy/default.nix
index f197b1080fb3e..54c96a73cb823 100644
--- a/pkgs/development/python-modules/spacy/default.nix
+++ b/pkgs/development/python-modules/spacy/default.nix
@@ -69,7 +69,7 @@ buildPythonPackage rec {
 
   postPatch = ''
     substituteInPlace setup.cfg \
-      --replace "pydantic>=1.7.4,!=1.8,!=1.8.1,<1.9.0" "pydantic~=1.2"
+      --replace "typer>=0.3.0,<0.5.0" "typer>=0.3.0"
   '';
 
   checkInputs = [
diff --git a/pkgs/development/python-modules/thinc/default.nix b/pkgs/development/python-modules/thinc/default.nix
index 6da1ae8944508..334411fe26c99 100644
--- a/pkgs/development/python-modules/thinc/default.nix
+++ b/pkgs/development/python-modules/thinc/default.nix
@@ -1,27 +1,28 @@
 { lib
 , stdenv
-, buildPythonPackage
-, python
-, fetchPypi
-, pytestCheckHook
+, Accelerate
 , blis
+, buildPythonPackage
 , catalogue
-, cymem
-, cython
+, confection
 , contextvars
-, dataclasses
-, Accelerate
 , CoreFoundation
 , CoreGraphics
 , CoreVideo
+, cymem
+, cython
+, dataclasses
+, fetchPypi
 , hypothesis
 , mock
 , murmurhash
 , numpy
 , plac
-, pythonOlder
 , preshed
 , pydantic
+, pytestCheckHook
+, python
+, pythonOlder
 , srsly
 , tqdm
 , typing-extensions
@@ -37,14 +38,9 @@ buildPythonPackage rec {
 
   src = fetchPypi {
     inherit pname version;
-    sha256 = "sha256-m5AoKYTzy6rJjgNn3xsa+eSDYjG8Bj361yQqnQ3VK80=";
+    hash = "sha256-m5AoKYTzy6rJjgNn3xsa+eSDYjG8Bj361yQqnQ3VK80=";
   };
 
-  postPatch = ''
-    substituteInPlace setup.cfg \
-      --replace "pydantic>=1.7.4,!=1.8,!=1.8.1,<1.9.0" "pydantic"
-  '';
-
   buildInputs = [
     cython
   ] ++ lib.optionals stdenv.isDarwin [
@@ -57,14 +53,15 @@ buildPythonPackage rec {
   propagatedBuildInputs = [
     blis
     catalogue
+    confection
     cymem
     murmurhash
     numpy
     plac
     preshed
+    pydantic
     srsly
     tqdm
-    pydantic
     wasabi
   ] ++ lib.optionals (pythonOlder "3.8") [
     typing-extensions
@@ -93,7 +90,7 @@ buildPythonPackage rec {
   ];
 
   meta = with lib; {
-    description = "Practical Machine Learning for NLP in Python";
+    description = "Library for NLP machine learning";
     homepage = "https://github.com/explosion/thinc";
     license = licenses.mit;
     maintainers = with maintainers; [ aborsu ];