Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at litex 2.5 kB view raw
1{ lib 2, stdenv 3, buildPythonPackage 4, fetchPypi 5, pythonOlder 6, aiodns 7, aiohttp 8, flask 9, mock 10, pytest 11, pytest-asyncio 12, pytest-trio 13, pytestCheckHook 14, requests 15, six 16, trio 17, typing-extensions }: 18 19buildPythonPackage rec { 20 version = "1.26.3"; 21 pname = "azure-core"; 22 disabled = pythonOlder "3.6"; 23 24 __darwinAllowLocalNetworking = true; 25 26 src = fetchPypi { 27 inherit pname version; 28 extension = "zip"; 29 hash = "sha256-rL0NqpZ1zohiPaNcgNgZza+pFzHe5rJpXGTXyp2oLbQ="; 30 }; 31 32 propagatedBuildInputs = [ 33 requests 34 six 35 typing-extensions 36 ]; 37 38 nativeCheckInputs = [ 39 aiodns 40 aiohttp 41 flask 42 mock 43 pytest 44 pytest-trio 45 pytest-asyncio 46 pytestCheckHook 47 trio 48 ]; 49 50 # test server needs to be available 51 preCheck = '' 52 export PYTHONPATH=tests/testserver_tests/coretestserver:$PYTHONPATH 53 ''; 54 55 pytestFlagsArray = [ "tests/" ]; 56 # disable tests which touch network 57 disabledTests = [ 58 "aiohttp" 59 "multipart_send" 60 "response" 61 "request" 62 "timeout" 63 "test_sync_transport_short_read_download_stream" 64 "test_aio_transport_short_read_download_stream" 65 # disable 8 tests failing on some darwin machines with errors: 66 # azure.core.polling.base_polling.BadStatus: Invalid return status 403 for 'GET' operation 67 # azure.core.exceptions.HttpResponseError: Operation returned an invalid status 'Forbidden' 68 ] ++ lib.optionals stdenv.isDarwin [ 69 "location_polling_fail" 70 ]; 71 disabledTestPaths = [ 72 # requires testing modules which aren't published, and likely to create cyclic dependencies 73 "tests/test_connection_string_parsing.py" 74 # wants network 75 "tests/async_tests/test_streaming_async.py" 76 "tests/test_streaming.py" 77 # testserver tests require being in a very specific working directory to make it work 78 "tests/testserver_tests/" 79 # requires missing pytest plugin 80 "tests/async_tests/test_rest_asyncio_transport.py" 81 # needs msrest, which cannot be included in nativeCheckInputs due to circular dependency new in msrest 0.7.1 82 # azure-core needs msrest which needs azure-core 83 "tests/test_polling.py" 84 "tests/async_tests/test_base_polling_async.py" 85 "tests/async_tests/test_polling_async.py" 86 ]; 87 88 meta = with lib; { 89 description = "Microsoft Azure Core Library for Python"; 90 homepage = "https://github.com/Azure/azure-sdk-for-python"; 91 license = licenses.mit; 92 maintainers = with maintainers; [ jonringer ]; 93 }; 94}