83 lines
1.9 KiB
Nix
83 lines
1.9 KiB
Nix
{ lib, stdenv, buildPythonPackage, fetchPypi, isPy27
|
|
, aiodns
|
|
, aiohttp
|
|
, flask
|
|
, mock
|
|
, msrest
|
|
, pytest
|
|
, pytest-asyncio
|
|
, pytest-trio
|
|
, pytestCheckHook
|
|
, requests
|
|
, six
|
|
, trio
|
|
, typing-extensions
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
version = "1.21.1";
|
|
pname = "azure-core";
|
|
disabled = isPy27;
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
extension = "zip";
|
|
sha256 = "88d2db5cf9a135a7287dc45fdde6b96f9ca62c9567512a3bb3e20e322ce7deb2";
|
|
};
|
|
|
|
propagatedBuildInputs = [
|
|
requests
|
|
six
|
|
];
|
|
|
|
checkInputs = [
|
|
aiodns
|
|
aiohttp
|
|
flask
|
|
mock
|
|
msrest
|
|
pytest
|
|
pytest-trio
|
|
pytest-asyncio
|
|
pytestCheckHook
|
|
trio
|
|
typing-extensions
|
|
];
|
|
|
|
# test server needs to be available
|
|
preCheck = ''
|
|
export PYTHONPATH=tests/testserver_tests/coretestserver:$PYTHONPATH
|
|
'';
|
|
|
|
pytestFlagsArray = [ "tests/" ];
|
|
# disable tests which touch network
|
|
disabledTests = [
|
|
"aiohttp"
|
|
"multipart_send"
|
|
"response"
|
|
"request"
|
|
"timeout"
|
|
# disable 8 tests failing on some darwin machines with errors:
|
|
# azure.core.polling.base_polling.BadStatus: Invalid return status 403 for 'GET' operation
|
|
# azure.core.exceptions.HttpResponseError: Operation returned an invalid status 'Forbidden'
|
|
] ++ lib.optional stdenv.isDarwin [
|
|
"location_polling_fail"
|
|
];
|
|
disabledTestPaths = [
|
|
# requires testing modules which aren't published, and likely to create cyclic dependencies
|
|
"tests/test_connection_string_parsing.py"
|
|
# wants network
|
|
"tests/async_tests/test_streaming_async.py"
|
|
"tests/test_streaming.py"
|
|
# testserver tests require being in a very specific working directory to make it work
|
|
"tests/testserver_tests/"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "Microsoft Azure Core Library for Python";
|
|
homepage = "https://github.com/Azure/azure-sdk-for-python";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ jonringer ];
|
|
};
|
|
}
|