1{ lib
2, aiohttp
3, aioresponses
4, buildPythonPackage
5, fetchFromGitHub
6, pytest-asyncio
7, pytest-error-for-skips
8, pytestCheckHook
9, pythonOlder
10}:
11
12buildPythonPackage rec {
13 pname = "accuweather";
14 version = "0.3.0";
15 disabled = pythonOlder "3.6";
16
17 src = fetchFromGitHub {
18 owner = "bieniu";
19 repo = pname;
20 rev = version;
21 sha256 = "sha256-Kn2hP0mdnC4+Lk8wsTznC23CsYLYKhya+HlHox1Fo2o=";
22 };
23
24 postPatch = ''
25 substituteInPlace setup.py \
26 --replace "pytest-runner" ""
27 substituteInPlace setup.cfg \
28 --replace "--cov --cov-report term-missing" ""
29 '';
30
31 propagatedBuildInputs = [
32 aiohttp
33 ];
34
35 checkInputs = [
36 aioresponses
37 pytest-asyncio
38 pytest-error-for-skips
39 pytestCheckHook
40 ];
41
42 pythonImportsCheck = [ "accuweather" ];
43
44 meta = with lib; {
45 description = "Python wrapper for getting weather data from AccuWeather servers";
46 homepage = "https://github.com/bieniu/accuweather";
47 license = licenses.asl20;
48 maintainers = with maintainers; [ jamiemagee ];
49 };
50}