python3Package.dashscope: init at 1.24.4 (#444975)
This commit is contained in:
@@ -0,0 +1,73 @@
|
||||
{
|
||||
# Basic
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
# Build system
|
||||
setuptools,
|
||||
# Dependencies
|
||||
aiohttp,
|
||||
requests,
|
||||
websocket-client,
|
||||
cryptography,
|
||||
certifi,
|
||||
# Test
|
||||
pytestCheckHook,
|
||||
tiktoken,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "dashscope";
|
||||
version = "1.24.4";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "dashscope";
|
||||
repo = "dashscope-sdk-python";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-PX7RoL4EGMU62G64+T6tjgDgO+SAOZNysl199kvAWME=";
|
||||
};
|
||||
|
||||
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 ];
|
||||
};
|
||||
}
|
||||
@@ -3327,6 +3327,8 @@ self: super: with self; {
|
||||
|
||||
dashing = callPackage ../development/python-modules/dashing { };
|
||||
|
||||
dashscope = callPackage ../development/python-modules/dashscope { };
|
||||
|
||||
dask = callPackage ../development/python-modules/dask { };
|
||||
|
||||
dask-awkward = callPackage ../development/python-modules/dask-awkward { };
|
||||
|
||||
Reference in New Issue
Block a user