1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pytestCheckHook,
6 pythonOlder,
7 setuptools,
8 google-auth,
9 google-auth-oauthlib,
10 google-cloud-storage,
11 requests,
12 decorator,
13 fsspec,
14 fusepy,
15 aiohttp,
16 crcmod,
17 pytest-timeout,
18 pytest-asyncio,
19}:
20
21buildPythonPackage rec {
22 pname = "gcsfs";
23 version = "2025.3.2";
24 pyproject = true;
25
26 disabled = pythonOlder "3.9";
27
28 src = fetchFromGitHub {
29 owner = "fsspec";
30 repo = "gcsfs";
31 tag = version;
32 hash = "sha256-aXBlj9ej3Ya7h4x/akl/iX6dDS/SgkkEsOQ2E9KmCDU=";
33 };
34
35 build-system = [
36 setuptools
37 ];
38
39 dependencies = [
40 aiohttp
41 decorator
42 fsspec
43 google-auth
44 google-auth-oauthlib
45 google-cloud-storage
46 requests
47 ];
48
49 optional-dependencies = {
50 gcsfuse = [ fusepy ];
51 crc = [ crcmod ];
52 };
53
54 nativeCheckInputs = [
55 pytest-timeout
56 pytest-asyncio
57 pytestCheckHook
58 ];
59
60 disabledTests = [
61 # Cannot connect to host storage.googleapis.com:443
62 "test_credentials_from_raw_token"
63 ];
64
65 disabledTestPaths = [
66 # Tests require a running Docker instance
67 "gcsfs/tests/test_core.py"
68 "gcsfs/tests/test_mapping.py"
69 "gcsfs/tests/test_retry.py"
70 "gcsfs/tests/derived/gcsfs_test.py"
71 "gcsfs/tests/test_inventory_report_listing.py"
72 ];
73
74 pythonImportsCheck = [ "gcsfs" ];
75
76 meta = {
77 description = "Convenient Filesystem interface over GCS";
78 homepage = "https://github.com/fsspec/gcsfs";
79 changelog = "https://github.com/fsspec/gcsfs/raw/${version}/docs/source/changelog.rst";
80 license = lib.licenses.bsd3;
81 maintainers = with lib.maintainers; [ nbren12 ];
82 };
83}