Skip to content

Commit 5dc2bcc

Browse files
authored
python312Packages.clarifai-grpc: 10.9.10 -> 10.11.2 (NixOS#360896)
2 parents 43d4dd0 + f7a9b59 commit 5dc2bcc

File tree

4 files changed

+100
-9
lines changed

4 files changed

+100
-9
lines changed

pkgs/development/python-modules/clarifai-grpc/default.nix

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,16 @@
1212

1313
buildPythonPackage rec {
1414
pname = "clarifai-grpc";
15-
version = "10.9.10";
15+
version = "10.11.2";
1616
pyproject = true;
1717

1818
disabled = pythonOlder "3.8";
1919

2020
src = fetchFromGitHub {
2121
owner = "Clarifai";
2222
repo = "clarifai-python-grpc";
23-
rev = "refs/tags/${version}";
24-
hash = "sha256-XJqbZicRQCiykdXn2R8tOzWPbtrso9IwZYpcTcY7vio=";
23+
tag = version;
24+
hash = "sha256-Px7VisC2j5pJctzB713cdalEccGbBsSuQBqDarwUTLA=";
2525
};
2626

2727
build-system = [ setuptools ];
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
{
2+
lib,
3+
stdenv,
4+
buildPythonPackage,
5+
fetchPypi,
6+
python,
7+
pypaInstallHook,
8+
wheelUnpackHook,
9+
grpcio,
10+
}:
11+
12+
let
13+
pythonVersionNoDot = builtins.replaceStrings [ "." ] [ "" ] python.pythonVersion;
14+
systemToPlatform = {
15+
"aarch64-linux" = "manylinux_2_17_aarch64.manylinux2014_aarch64";
16+
"x86_64-linux" = "manylinux_2_17_x86_64.manylinux2014_x86_64";
17+
"aarch64-darwin" = "macosx_11_0_universal2";
18+
"x86_64-darwin" = "macosx_11_0_universal2";
19+
};
20+
21+
hashes = {
22+
"39-x86_64-linux" = "sha256-uGbsxSHGfYVzRiy1YEkQMkJi2yPLdSj3fe3adp1WjP0=";
23+
"310-x86_64-linux" = "sha256-1SO/1lpB3aRWisxFlt8K5lwFEOiDXjC4iQRai77L+8E=";
24+
"311-x86_64-linux" = "sha256-99VdM1fAcuiblReWL5I8+H0psCKR00HYZr/wRGT7nd8=";
25+
"312-x86_64-linux" = "sha256-bbggF4rGDrXOpSegreFHgK0H/z7xaR9hb7z6SYp7nlU=";
26+
"313-x86_64-linux" = "sha256-M9/t7JgIjh7yiZeEq9K2tGQ4oLneVhXf0rUfL8p09Tg=";
27+
"39-aarch64-linux" = "sha256-wuEncCbqWdqO72zovzHrmb34on73eaQgFBmQZdUnwkE=";
28+
"310-aarch64-linux" = "sha256-uLHEEPcVakctNT428pNlaq0yKDpvMLynDP2lDobiebA=";
29+
"311-aarch64-linux" = "sha256-d2A4mKP4Dlnm6J31wPyAHg8d5MjFF4wcREe5FVFeayU=";
30+
"312-aarch64-linux" = "sha256-aW295fQogAjaVK6saHhduKsVsncIv4BsfRW6qHlyb3g=";
31+
"313-aarch64-linux" = "sha256-mloW8TGkBJWXqO6xOqHhra3ZXuGQWf6dEGSrkdD0sb0=";
32+
"39-darwin" = "sha256-uU9RGo5glYOPp8nEYqj4c1TB3Xa1KwrNWMqNDpJsSjY=";
33+
"310-darwin" = "sha256-80U0geHKJLVhhmvHayXWHWaV9ifJjWtR9mbwCUDfPu0=";
34+
"311-darwin" = "sha256-kM2YVzPa22QgIRV4zP4kcvTE8al/RW0Oo6lyxJl3JxU=";
35+
"312-darwin" = "sha256-t4qbP5wqE8cgkvN+vG6zOeS+s5+U/GjmbeeHytIo9/o=";
36+
"313-darwin" = "sha256-ds2kj87miODVUE8Lrjuzz8L+2HxaQ7jTxGQF0/Odrpg=";
37+
};
38+
in
39+
buildPythonPackage rec {
40+
pname = "clarifai-protocol";
41+
version = "0.0.14";
42+
pyproject = false;
43+
44+
src = fetchPypi {
45+
pname = "clarifai_protocol";
46+
inherit version;
47+
format = "wheel";
48+
python = "cp${pythonVersionNoDot}";
49+
abi = "cp${pythonVersionNoDot}";
50+
dist = "cp${pythonVersionNoDot}";
51+
platform = systemToPlatform.${stdenv.hostPlatform.system} or (throw "unsupported system");
52+
hash =
53+
if stdenv.hostPlatform.isDarwin then
54+
hashes."${pythonVersionNoDot}-darwin"
55+
else
56+
hashes."${pythonVersionNoDot}-${stdenv.hostPlatform.system}"
57+
or (throw "unsupported system/python version combination");
58+
};
59+
60+
nativeBuildInputs = [
61+
pypaInstallHook
62+
wheelUnpackHook
63+
];
64+
65+
dependencies = [ grpcio ];
66+
67+
# require clarifai and it causes a circular import
68+
dontUsePythonImportsCheck = true;
69+
70+
# no tests
71+
doCheck = false;
72+
73+
meta = {
74+
description = "Clarifai Python Runner Protocol";
75+
homepage = "https://pypi.org/project/clarifai-protocol";
76+
license = lib.licenses.asl20;
77+
sourceProvenance = [ lib.sourceTypes.binaryNativeCode ];
78+
maintainers = with lib.maintainers; [ natsukium ];
79+
};
80+
}

pkgs/development/python-modules/clarifai/default.nix

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22
lib,
33
buildPythonPackage,
44
clarifai-grpc,
5+
clarifai-protocol,
6+
click,
57
fetchFromGitHub,
8+
fsspec,
69
inquirerpy,
710
numpy,
811
pillow,
@@ -20,27 +23,30 @@
2023

2124
buildPythonPackage rec {
2225
pname = "clarifai";
23-
version = "10.8.6";
26+
version = "10.11.1";
2427
pyproject = true;
2528

2629
disabled = pythonOlder "3.8";
2730

2831
src = fetchFromGitHub {
2932
owner = "Clarifai";
3033
repo = "clarifai-python";
31-
rev = "refs/tags/${version}";
32-
hash = "sha256-/fHNRFtxyNa9VdEi5wQ+YA+9mFv3ZpRFJQnWkuxQd5I=";
34+
tag = version;
35+
hash = "sha256-dXsEYHkt4Z2YldqbCorNPG7rVSLfU8shYdk6lzFBz/M=";
3336
};
3437

3538
pythonRelaxDeps = [
36-
"clarifai-grpc"
39+
"fsspec"
3740
"schema"
3841
];
3942

4043
build-system = [ setuptools ];
4144

4245
dependencies = [
4346
clarifai-grpc
47+
clarifai-protocol
48+
click
49+
fsspec
4450
inquirerpy
4551
numpy
4652
pillow
@@ -71,16 +77,19 @@ buildPythonPackage rec {
7177

7278
disabledTestPaths = [
7379
# Tests require network access and API key
80+
"tests/cli/test_compute_orchestration.py"
81+
"tests/runners/test_anymodel.py"
82+
"tests/runners/test_textmodel.py"
83+
"tests/runners/test_url_fetcher.py"
7484
"tests/test_app.py"
7585
"tests/test_data_upload.py"
7686
"tests/test_eval.py"
7787
"tests/test_model_predict.py"
7888
"tests/test_model_train.py"
89+
"tests/test_rag.py"
7990
"tests/test_search.py"
8091
"tests/workflow/test_create_delete.py"
8192
"tests/workflow/test_predict.py"
82-
"tests/test_rag.py"
83-
"clarifai/models/model_serving/repo_build/static_files/base_test.py"
8493
];
8594

8695
pythonImportsCheck = [ "clarifai" ];

pkgs/top-level/python-packages.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2334,6 +2334,8 @@ self: super: with self; {
23342334

23352335
clarifai-grpc = callPackage ../development/python-modules/clarifai-grpc { };
23362336

2337+
clarifai-protocol = callPackage ../development/python-modules/clarifai-protocol { };
2338+
23372339
claripy = callPackage ../development/python-modules/claripy { };
23382340

23392341
classify-imports = callPackage ../development/python-modules/classify-imports { };

0 commit comments

Comments
 (0)