a0cb138ada
GitOrigin-RevId: a100acd7bbf105915b0004427802286c37738fef
57 lines
1.2 KiB
Nix
57 lines
1.2 KiB
Nix
{ lib
|
|
, aiohttp
|
|
, aioresponses
|
|
, buildPythonPackage
|
|
, fetchFromGitHub
|
|
, orjson
|
|
, pytest-asyncio
|
|
, pytest-error-for-skips
|
|
, pytestCheckHook
|
|
, pythonOlder
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "accuweather";
|
|
version = "0.5.0";
|
|
format = "setuptools";
|
|
|
|
disabled = pythonOlder "3.8";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "bieniu";
|
|
repo = pname;
|
|
rev = "refs/tags/${version}";
|
|
hash = "sha256-v4mFvW+p0g+5IeZT8o0Z60MafHyYZ62d4lNH27wlAeI=";
|
|
};
|
|
|
|
postPatch = ''
|
|
substituteInPlace setup.py \
|
|
--replace "pytest-runner" ""
|
|
substituteInPlace setup.cfg \
|
|
--replace "--cov --cov-report term-missing" ""
|
|
'';
|
|
|
|
propagatedBuildInputs = [
|
|
aiohttp
|
|
orjson
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
aioresponses
|
|
pytest-asyncio
|
|
pytest-error-for-skips
|
|
pytestCheckHook
|
|
];
|
|
|
|
pythonImportsCheck = [
|
|
"accuweather"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "Python wrapper for getting weather data from AccuWeather servers";
|
|
homepage = "https://github.com/bieniu/accuweather";
|
|
changelog = "https://github.com/bieniu/accuweather/releases/tag/${version}";
|
|
license = licenses.asl20;
|
|
maintainers = with maintainers; [ jamiemagee ];
|
|
};
|
|
}
|