2021-03-09 03:18:52 +00:00
|
|
|
{ lib
|
|
|
|
, aiohttp
|
|
|
|
, aioresponses
|
2021-04-05 15:23:46 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2021-03-09 03:18:52 +00:00
|
|
|
, pytest-asyncio
|
2021-04-05 15:23:46 +00:00
|
|
|
, pytest-error-for-skips
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
2021-03-09 03:18:52 +00:00
|
|
|
}:
|
2020-10-19 00:13:06 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "accuweather";
|
2021-10-14 00:43:12 +00:00
|
|
|
version = "0.3.0";
|
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-10-14 00:43:12 +00:00
|
|
|
sha256 = "sha256-Kn2hP0mdnC4+Lk8wsTznC23CsYLYKhya+HlHox1Fo2o=";
|
2020-10-19 00:13:06 +00:00
|
|
|
};
|
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
postPatch = ''
|
2021-04-05 15:23:46 +00:00
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "pytest-runner" ""
|
2021-05-20 23:08:51 +00:00
|
|
|
substituteInPlace setup.cfg \
|
2021-04-05 15:23:46 +00:00
|
|
|
--replace "--cov --cov-report term-missing" ""
|
2021-03-09 03:18:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-04-05 15:23:46 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
aiohttp
|
|
|
|
];
|
2021-03-09 03:18:52 +00:00
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
aioresponses
|
|
|
|
pytest-asyncio
|
2021-04-05 15:23:46 +00:00
|
|
|
pytest-error-for-skips
|
|
|
|
pytestCheckHook
|
2021-03-09 03:18:52 +00:00
|
|
|
];
|
2020-10-19 00:13:06 +00:00
|
|
|
|
2021-04-05 15:23:46 +00:00
|
|
|
pythonImportsCheck = [ "accuweather" ];
|
|
|
|
|
2020-10-19 00:13:06 +00:00
|
|
|
meta = with lib; {
|
2021-04-05 15:23:46 +00:00
|
|
|
description = "Python wrapper for getting weather data from AccuWeather servers";
|
2020-10-19 00:13:06 +00:00
|
|
|
homepage = "https://github.com/bieniu/accuweather";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ jamiemagee ];
|
|
|
|
};
|
|
|
|
}
|