2021-03-09 03:18:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pythonOlder
|
|
|
|
, pytestrunner
|
|
|
|
, aiohttp
|
|
|
|
, aioresponses
|
|
|
|
, pytestCheckHook
|
|
|
|
, pytestcov
|
|
|
|
, pytest-asyncio
|
|
|
|
}:
|
2020-10-19 00:13:06 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "accuweather";
|
2021-03-09 03:18:52 +00:00
|
|
|
version = "0.1.0";
|
2020-10-19 00:13:06 +00:00
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
2020-10-19 00:13:06 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "bieniu";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2021-03-09 03:18:52 +00:00
|
|
|
sha256 = "0jp2x7fgg1shgr1fx296rni00lmjjmjgg141giljzizgd04dwgy3";
|
2020-10-19 00:13:06 +00:00
|
|
|
};
|
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
postPatch = ''
|
|
|
|
# we don't have pytest-error-for-skips packaged
|
|
|
|
substituteInPlace pytest.ini --replace "--error-for-skips" ""
|
|
|
|
'';
|
|
|
|
|
2020-10-19 00:13:06 +00:00
|
|
|
nativeBuildInputs = [ pytestrunner ];
|
2021-03-09 03:18:52 +00:00
|
|
|
|
2020-10-19 00:13:06 +00:00
|
|
|
propagatedBuildInputs = [ aiohttp ];
|
2021-03-09 03:18:52 +00:00
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
aioresponses
|
|
|
|
pytestCheckHook
|
|
|
|
pytestcov
|
|
|
|
pytest-asyncio
|
|
|
|
];
|
2020-10-19 00:13:06 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description =
|
|
|
|
"Python wrapper for getting weather data from AccuWeather servers.";
|
|
|
|
homepage = "https://github.com/bieniu/accuweather";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ jamiemagee ];
|
|
|
|
};
|
|
|
|
}
|