nixpkgs/pkgs/development/python-modules/dashscope/default.nix
Martin Weinelt bb9da0733c python3Packages.dashscope: 1.25.6 -> 1.25.9
This commit was automatically generated using update-python-libraries.
2026-02-01 16:42:50 +01:00

73 lines
1.4 KiB
Nix

{
# Basic
lib,
buildPythonPackage,
fetchFromGitHub,
# Build system
setuptools,
# Dependencies
aiohttp,
requests,
websocket-client,
cryptography,
certifi,
# Test
pytestCheckHook,
tiktoken,
}:
buildPythonPackage rec {
pname = "dashscope";
version = "1.25.9";
pyproject = true;
src = fetchFromGitHub {
owner = "dashscope";
repo = "dashscope-sdk-python";
tag = "v${version}";
hash = "sha256-VR7Auso+0al9qAE3IDFAPl5zIX0Yp9OfJchR+Q9DB1o=";
};
build-system = [ setuptools ];
dependencies = [
aiohttp
requests
websocket-client
cryptography
certifi
];
# Specify the version explicitly
postPatch = ''
substituteInPlace setup.py \
--replace-fail "version=get_version()," "version='${version}',"
'';
nativeCheckInputs = [
pytestCheckHook
tiktoken
];
pythonImportsCheck = [ "dashscope" ];
disabledTests = [
# Needs network access and/or API key
"TestAsyncImageSynthesisRequest"
"TestAsyncRequest"
"TestAsyncVideoSynthesisRequest"
"TestEncryption"
"TestSpeechRecognition"
"TestSpeechTranscribe"
"TestSynthesis"
"TestWebSocketAsyncRequest"
"TestWebSocketSyncRequest"
];
meta = {
description = "Python SDK for dashscope";
homepage = "https://github.com/dashscope/dashscope-sdk-python";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ thattemperature ];
};
}