about summary refs log tree commit diff
path: root/pkgs/development/python-modules/pydantic
diff options
context:
space:
mode:
authorMartin Weinelt <hexa@darmstadt.ccc.de>2022-02-17 12:31:55 +0100
committerMartin Weinelt <hexa@darmstadt.ccc.de>2022-02-17 12:31:55 +0100
commitac247ed8315bead7d1c5d32a8058790149e6ad50 (patch)
treeb1b59eaa2c58c249cbe473696705b8c3234f54e1 /pkgs/development/python-modules/pydantic
parentd98007c59a36cec1d7e186367b59241be07882a3 (diff)
python3Packages.pydantic: cythonize
Compiling pydantic with cython is supposed to give a 30-50% performance
benefit.

>>> import pydantic
>>> pydantic.compiled
True

https://pydantic-docs.helpmanual.io/install/#compiled-with-cython
Diffstat (limited to 'pkgs/development/python-modules/pydantic')
-rw-r--r--pkgs/development/python-modules/pydantic/default.nix9
1 files changed, 7 insertions, 2 deletions
diff --git a/pkgs/development/python-modules/pydantic/default.nix b/pkgs/development/python-modules/pydantic/default.nix
index 1072a4e24422a..8ac9eeca2a83c 100644
--- a/pkgs/development/python-modules/pydantic/default.nix
+++ b/pkgs/development/python-modules/pydantic/default.nix
@@ -1,5 +1,7 @@
 { lib
 , buildPythonPackage
+, cython
+, devtools
 , email_validator
 , fetchFromGitHub
 , pytest-mock
@@ -7,7 +9,6 @@
 , python-dotenv
 , pythonOlder
 , typing-extensions
-, ujson
 }:
 
 buildPythonPackage rec {
@@ -22,11 +23,15 @@ buildPythonPackage rec {
     sha256 = "sha256-C4WP8tiMRFmkDkQRrvP3yOSM2zN8pHJmX9cdANIckpM=";
   };
 
+  nativeBuildInputs = [
+    cython
+  ];
+
   propagatedBuildInputs = [
+    devtools
     email_validator
     python-dotenv
     typing-extensions
-    ujson
   ];
 
   checkInputs = [