lol

python3Packages.ray: add support for aarch64-linux (#378935)

authored by

Pavol Rusnak and committed by
GitHub
508be1c4 fb12b199

+27 -8
+27 -8
pkgs/development/python-modules/ray/default.nix
··· 1 1 { 2 2 lib, 3 + stdenv, 3 4 buildPythonPackage, 4 5 pythonOlder, 5 6 pythonAtLeast, ··· 71 72 inherit pname version; 72 73 format = "wheel"; 73 74 74 - disabled = pythonOlder "3.10" || pythonAtLeast "3.13"; 75 + disabled = pythonOlder "3.9" || pythonAtLeast "3.13"; 75 76 76 77 src = 77 78 let 78 79 pyShortVersion = "cp${builtins.replaceStrings [ "." ] [ "" ] python.pythonVersion}"; 79 - binary-hashes = { 80 - cp310 = "sha256-OTLW2zqJgsUZbbCM9W4u0L9QuFaFCM/khr6N5jui2V0="; 81 - cp311 = "sha256-//XpzFpTgV07WGomHjS9D+8cMkss3tTJuOeQ4ePcOZc="; 82 - cp312 = "sha256-PXassHD6i9Tr2wEazfoiu4m9vps1+3iuxZgdt26sK2A="; 80 + platforms = { 81 + aarch64-linux = "manylinux2014_aarch64"; 82 + x86_64-linux = "manylinux2014_x86_64"; 83 + }; 84 + # hashes retrieved via the following command 85 + # curl https://pypi.org/pypi/ray/${version}/json | jq -r '.urls[] | "\(.digests.sha256) \(.filename)"' 86 + hashes = { 87 + aarch64-linux = { 88 + cp39 = "782f29c8d743304fb3b67ed825db6caf5e5bd9263d628a6ff67a61bccde9f176"; 89 + cp310 = "fbb2cf4a86f4705faea6334356faa4dc7f454210e6eb085d63b7f1ae6e9c12e1"; 90 + cp311 = "68c9cc50af0dfafa78e5047890018cf3115fae8702ab083ac78b59b349989d45"; 91 + cp312 = "c9712ee4c52b7764b2ec9c693419ffde1313dd79cb186173dae6e25db44993de"; 92 + }; 93 + x86_64-linux = { 94 + cp39 = "fe837e717a642a648f6fa8cc285e3ccc6782d126b8af793a25903fa3ac8d5c22"; 95 + cp310 = "3932d6db3a8982c5196db08cf56e2ed0bf50b8568508cfe486be8de63ba2d95d"; 96 + cp311 = "fff5e9cc5a53815d3b586a261e34bd0fef1c324b2cded4c9b8e790e1e3dc3997"; 97 + cp312 = "3d76acb070fa8bd4ebdb011acdfa22bb89bdbe9b35fb78aec5981db76eac2b60"; 98 + }; 83 99 }; 84 100 in 85 101 fetchPypi { ··· 87 103 dist = pyShortVersion; 88 104 python = pyShortVersion; 89 105 abi = pyShortVersion; 90 - platform = "manylinux2014_x86_64"; 91 - hash = binary-hashes.${pyShortVersion} or { }; 106 + platform = platforms.${stdenv.hostPlatform.system} or { }; 107 + sha256 = hashes.${stdenv.hostPlatform.system}.${pyShortVersion} or { }; 92 108 }; 93 109 94 110 nativeBuildInputs = [ ··· 192 208 license = lib.licenses.asl20; 193 209 maintainers = with lib.maintainers; [ billhuang ]; 194 210 sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; 195 - platforms = [ "x86_64-linux" ]; 211 + platforms = [ 212 + "aarch64-linux" 213 + "x86_64-linux" 214 + ]; 196 215 }; 197 216 }