python3Packages.msrest: switch to pytestCheckHook and clean-up
This commit is contained in:
parent
52165eefbe
commit
d9ddafc4c9
@ -1,51 +1,66 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, isPy3k
|
||||
, requests
|
||||
, requests_oauthlib
|
||||
, isodate
|
||||
, certifi
|
||||
, enum34 ? null
|
||||
, typing
|
||||
, aiohttp
|
||||
, aiodns
|
||||
, pytest
|
||||
, aiohttp
|
||||
, buildPythonPackage
|
||||
, certifi
|
||||
, fetchFromGitHub
|
||||
, httpretty
|
||||
, mock
|
||||
, futures ? null
|
||||
, isodate
|
||||
, pytest-aiohttp
|
||||
, pytestCheckHook
|
||||
, pythonOlder
|
||||
, requests
|
||||
, requests-oauthlib
|
||||
, trio
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
version = "0.6.21";
|
||||
pname = "msrest";
|
||||
version = "0.6.21";
|
||||
format = "setuptools";
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
# no tests in PyPI tarball
|
||||
# see https://github.com/Azure/msrest-for-python/pull/152
|
||||
src = fetchFromGitHub {
|
||||
owner = "Azure";
|
||||
repo = "msrest-for-python";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-IlBwlVQ/v+vJmCWNbFZKGL6a9K09z4AYrPm3kwaA/nI=";
|
||||
hash = "sha256-IlBwlVQ/v+vJmCWNbFZKGL6a9K09z4AYrPm3kwaA/nI=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
requests requests_oauthlib isodate certifi
|
||||
] ++ lib.optionals (!isPy3k) [ enum34 typing ]
|
||||
++ lib.optionals isPy3k [ aiohttp aiodns ];
|
||||
aiodns
|
||||
aiohttp
|
||||
certifi
|
||||
isodate
|
||||
requests
|
||||
requests-oauthlib
|
||||
];
|
||||
|
||||
checkInputs = [ pytest httpretty ]
|
||||
++ lib.optionals (!isPy3k) [ mock futures ]
|
||||
++ lib.optional isPy3k trio;
|
||||
checkInputs = [
|
||||
httpretty
|
||||
pytest-aiohttp
|
||||
pytestCheckHook
|
||||
trio
|
||||
];
|
||||
|
||||
# Deselected tests require network access
|
||||
checkPhase = ''
|
||||
pytest tests/ -k "not test_conf_async_trio_requests"
|
||||
'';
|
||||
disabledTests = [
|
||||
# Test require network access
|
||||
"test_basic_aiohttp"
|
||||
"test_basic_aiohttp"
|
||||
"test_basic_async_requests"
|
||||
"test_basic_async_requests"
|
||||
"test_conf_async_requests"
|
||||
"test_conf_async_requests"
|
||||
"test_conf_async_trio_requests"
|
||||
];
|
||||
|
||||
pythonImportsCheck = [
|
||||
"msrest"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "The runtime library 'msrest' for AutoRest generated Python clients.";
|
||||
description = "The runtime library for AutoRest generated Python clients";
|
||||
homepage = "https://github.com/Azure/msrest-for-python";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ bendlas jonringer maxwilson ];
|
||||
|
Loading…
Reference in New Issue
Block a user