2021-03-03 23:07:11 +00:00
|
|
|
{ lib
|
|
|
|
, aiohttp
|
|
|
|
, aioresponses
|
2021-04-01 09:56:38 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2021-03-03 23:07:11 +00:00
|
|
|
, pytest-asyncio
|
2021-04-01 09:56:38 +00:00
|
|
|
, pytest-error-for-skips
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
2021-03-03 23:07:11 +00:00
|
|
|
}:
|
2020-09-24 12:23:24 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "accuweather";
|
2021-10-11 20:55:03 +00:00
|
|
|
version = "0.3.0";
|
2021-03-03 23:07:11 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
2020-09-24 12:23:24 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "bieniu";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2021-10-11 20:55:03 +00:00
|
|
|
sha256 = "sha256-Kn2hP0mdnC4+Lk8wsTznC23CsYLYKhya+HlHox1Fo2o=";
|
2020-09-24 12:23:24 +00:00
|
|
|
};
|
|
|
|
|
2021-03-03 23:07:11 +00:00
|
|
|
postPatch = ''
|
2021-04-01 09:56:38 +00:00
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "pytest-runner" ""
|
2021-05-13 21:07:42 +00:00
|
|
|
substituteInPlace setup.cfg \
|
2021-04-01 09:56:38 +00:00
|
|
|
--replace "--cov --cov-report term-missing" ""
|
2021-03-03 23:07:11 +00:00
|
|
|
'';
|
|
|
|
|
2021-04-01 09:56:38 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
aiohttp
|
|
|
|
];
|
2021-03-03 23:07:11 +00:00
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
aioresponses
|
|
|
|
pytest-asyncio
|
2021-04-01 09:56:38 +00:00
|
|
|
pytest-error-for-skips
|
|
|
|
pytestCheckHook
|
2021-03-03 23:07:11 +00:00
|
|
|
];
|
2020-09-24 12:23:24 +00:00
|
|
|
|
2021-04-01 09:56:38 +00:00
|
|
|
pythonImportsCheck = [ "accuweather" ];
|
|
|
|
|
2020-09-24 12:23:24 +00:00
|
|
|
meta = with lib; {
|
2021-04-01 09:56:38 +00:00
|
|
|
description = "Python wrapper for getting weather data from AccuWeather servers";
|
2020-09-24 12:23:24 +00:00
|
|
|
homepage = "https://github.com/bieniu/accuweather";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ jamiemagee ];
|
|
|
|
};
|
|
|
|
}
|