depot/third_party/nixpkgs/pkgs/development/python-modules/gios/default.nix
Default email a3d4720129 Project import generated by Copybara.
GitOrigin-RevId: e182da8622a354d44c39b3d7a542dc12cd7baa5f
2022-12-28 22:21:41 +01:00

62 lines
1.2 KiB
Nix

{ lib
, aiohttp
, aioresponses
, buildPythonPackage
, dacite
, fetchFromGitHub
, pytest-asyncio
, pytest-error-for-skips
, pytestCheckHook
, pythonOlder
}:
buildPythonPackage rec {
pname = "gios";
version = "2.3.0";
format = "setuptools";
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "bieniu";
repo = pname;
rev = version;
hash = "sha256-/lAENP9wKZ+h2Iq2e9S7s7Naa0CTl/I2cwCxBEAwsrA=";
};
propagatedBuildInputs = [
aiohttp
dacite
];
checkInputs = [
aioresponses
pytest-asyncio
pytest-error-for-skips
pytestCheckHook
];
postPatch = ''
substituteInPlace setup.cfg \
--replace "--cov --cov-report term-missing " ""
substituteInPlace setup.py \
--replace "pytest-runner" ""
'';
disabledTests = [
# Test requires network access
"test_invalid_station_id"
];
pythonImportsCheck = [
"gios"
];
meta = with lib; {
description = "Python client for getting air quality data from GIOS";
homepage = "https://github.com/bieniu/gios";
changelog = "https://github.com/bieniu/gios/releases/tag/${version}";
license = licenses.asl20;
maintainers = with maintainers; [ fab ];
};
}