diff options
Diffstat (limited to 'pkgs/development/python-modules/smart-open/default.nix')
-rw-r--r-- | pkgs/development/python-modules/smart-open/default.nix | 86 |
1 files changed, 39 insertions, 47 deletions
diff --git a/pkgs/development/python-modules/smart-open/default.nix b/pkgs/development/python-modules/smart-open/default.nix index b9622276bdf88..aa98f44b02ff1 100644 --- a/pkgs/development/python-modules/smart-open/default.nix +++ b/pkgs/development/python-modules/smart-open/default.nix @@ -1,20 +1,22 @@ -{ lib -, buildPythonPackage -, pythonOlder -, fetchFromGitHub -, azure-common -, azure-core -, azure-storage-blob -, boto3 -, google-cloud-storage -, requests -, moto -, paramiko -, pytestCheckHook -, responses -, setuptools -, wrapt -, zstandard +{ + lib, + buildPythonPackage, + pythonOlder, + fetchFromGitHub, + fetchpatch, + azure-common, + azure-core, + azure-storage-blob, + boto3, + google-cloud-storage, + requests, + moto, + paramiko, + pytestCheckHook, + responses, + setuptools, + wrapt, + zstandard, }: buildPythonPackage rec { @@ -31,43 +33,35 @@ buildPythonPackage rec { hash = "sha256-4HOTaF6AKXGlVCvSGKnnaH73aa4IO0aRxz03XQ4gSd8="; }; - build-system = [ - setuptools + patches = [ + # https://github.com/RaRe-Technologies/smart_open/pull/822 + # fix test_smart_open.py on python 3.12 + (fetchpatch { + name = "fix-smart-open-test.patch"; + url = "https://github.com/RaRe-Technologies/smart_open/commit/3d29564ca034a56d343c9d14b178aaa0ff4c937c.patch"; + hash = "sha256-CrAeqaIMM8bctWiFnq9uamnIlkaslDyjaWL6k9wUjT8="; + }) ]; - dependencies = [ - wrapt - ]; + build-system = [ setuptools ]; + + dependencies = [ wrapt ]; optional-dependencies = { - s3 = [ - boto3 - ]; - gcs = [ - google-cloud-storage - ]; + s3 = [ boto3 ]; + gcs = [ google-cloud-storage ]; azure = [ azure-storage-blob azure-common azure-core ]; - http = [ - requests - ]; - webhdfs = [ - requests - ]; - ssh = [ - paramiko - ]; - zst = [ - zstandard - ]; + http = [ requests ]; + webhdfs = [ requests ]; + ssh = [ paramiko ]; + zst = [ zstandard ]; }; - pythonImportsCheck = [ - "smart_open" - ]; + pythonImportsCheck = [ "smart_open" ]; nativeCheckInputs = [ moto @@ -75,9 +69,7 @@ buildPythonPackage rec { responses ] ++ lib.flatten (builtins.attrValues optional-dependencies); - pytestFlagsArray = [ - "smart_open" - ]; + pytestFlagsArray = [ "smart_open" ]; disabledTests = [ # https://github.com/RaRe-Technologies/smart_open/issues/784 @@ -88,7 +80,7 @@ buildPythonPackage rec { ]; meta = with lib; { - changelog = "https://github.com/piskvorky/smart_open/releases/tag/v${version}"; + changelog = "https://github.com/piskvorky/smart_open/releases/tag/v${version}"; description = "Library for efficient streaming of very large file"; homepage = "https://github.com/RaRe-Technologies/smart_open"; license = licenses.mit; |