From d4e8ce40f0c04b43d76475c7d7206716c5eeb8ca Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Tue, 24 Oct 2023 10:12:49 +0200 Subject: [PATCH] python311Packages.cloudpathlib: init at 0.16.0 --- .../python-modules/cloudpathlib/default.nix | 82 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 84 insertions(+) create mode 100644 pkgs/development/python-modules/cloudpathlib/default.nix diff --git a/pkgs/development/python-modules/cloudpathlib/default.nix b/pkgs/development/python-modules/cloudpathlib/default.nix new file mode 100644 index 000000000000..ae22d4bcafbf --- /dev/null +++ b/pkgs/development/python-modules/cloudpathlib/default.nix @@ -0,0 +1,82 @@ +{ lib +, buildPythonPackage +, pythonOlder +, fetchFromGitHub +, flit-core +, importlib-metadata +, typing-extensions +, cloudpathlib +, azure-storage-blob +, google-cloud-storage +, boto3 +, psutil +, pydantic +, pytestCheckHook +, pytest-cases +, pytest-cov +, pytest-xdist +, python-dotenv +, shortuuid +}: + +buildPythonPackage rec { + pname = "cloudpathlib"; + version = "0.16.0"; + pyproject = true; + + disabled = pythonOlder "3.7"; + + src = fetchFromGitHub { + owner = "drivendataorg"; + repo = "cloudpathlib"; + rev = "v${version}"; + hash = "sha256-d4CbzPy3H5HQ4YmSRCRMEYaTpwB7F0Bznd26aKWiHTA="; + }; + + nativeBuildInputs = [ + flit-core + ]; + + propagatedBuildInputs = [ + importlib-metadata + typing-extensions + ]; + + passthru.optional-dependencies = { + all = [ + cloudpathlib + ]; + azure = [ + azure-storage-blob + ]; + gs = [ + google-cloud-storage + ]; + s3 = [ + boto3 + ]; + }; + + pythonImportsCheck = [ "cloudpathlib" ]; + + nativeCheckInputs = [ + azure-storage-blob + boto3 + google-cloud-storage + psutil + pydantic + pytestCheckHook + pytest-cases + pytest-cov + pytest-xdist + python-dotenv + shortuuid + ]; + + meta = with lib; { + description = "Python pathlib-style classes for cloud storage services such as Amazon S3, Azure Blob Storage, and Google Cloud Storage"; + homepage = "https://github.com/drivendataorg/cloudpathlib"; + license = licenses.mit; + maintainers = with maintainers; [ GaetanLepage ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 60dd73c24a54..2426d45c1884 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2126,6 +2126,8 @@ self: super: with self; { cloudflare = callPackage ../development/python-modules/cloudflare { }; + cloudpathlib = callPackage ../development/python-modules/cloudpathlib { }; + cloudpickle = callPackage ../development/python-modules/cloudpickle { }; cloudscraper = callPackage ../development/python-modules/cloudscraper { };