11 pythonVersionNoDot = builtins.replaceStrings [ "." ] [ "" ] python.pythonVersion;
13 "x86_64-linux" = "manylinux_2_17_x86_64.manylinux2014_x86_64";
14 "aarch64-darwin" = "macosx_11_0_arm64";
17 "310-x86_64-linux" = "sha256-Zuy2zBLV950CMbdtpLNpIWqnXHw2jkjrZG48eGtm42w=";
18 "311-x86_64-linux" = "sha256-Bg5j8QB5z8Ju4bEQsZDojJHTJ4UoQF1pkd4ma83Sc/s=";
19 "310-aarch64-darwin" = "sha256-6Tta4ru1TnobFa4FXWz8fm9rAxF0G09Y2Pj/KaQPVnE=";
20 "311-aarch64-darwin" = "sha256-Sb0tv9ZPQJ4n9b0ybpjJWpreQPZvSC5Sd7CXuUwHCn0=";
23 buildPythonPackage rec {
24 pname = "tensorstore";
28 # The source build involves some wonky Bazel stuff.
30 inherit pname version;
32 python = "cp${pythonVersionNoDot}";
33 abi = "cp${pythonVersionNoDot}";
34 dist = "cp${pythonVersionNoDot}";
35 platform = systemToPlatform.${stdenv.system} or (throw "unsupported system");
36 hash = hashes."${pythonVersionNoDot}-${stdenv.system}" or (throw "unsupported system/python version combination");
39 nativeBuildInputs = lib.optionals stdenv.isLinux [ autoPatchelfHook ];
41 propagatedBuildInputs = [ numpy ];
43 pythonImportsCheck = [ "tensorstore" ];
46 description = "Library for reading and writing large multi-dimensional arrays";
47 homepage = "https://google.github.io/tensorstore";
48 changelog = "https://github.com/google/tensorstore/releases/tag/v${version}";
49 license = licenses.asl20;
50 sourceProvenance = [ sourceTypes.binaryNativeCode ];
51 maintainers = with maintainers; [ samuela ];