2024-04-21 15:54:59 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
geojson,
|
|
|
|
pysocks,
|
|
|
|
pythonOlder,
|
|
|
|
requests,
|
|
|
|
setuptools,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonRelaxDepsHook,
|
2021-03-09 03:18:52 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pyowm";
|
2022-02-20 05:27:41 +00:00
|
|
|
version = "3.3.0";
|
2024-04-21 15:54:59 +00:00
|
|
|
pyproject = true;
|
2022-02-20 05:27:41 +00:00
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "csparpa";
|
2024-04-21 15:54:59 +00:00
|
|
|
repo = "pyowm";
|
|
|
|
rev = "refs/tags/${version}";
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-cSOhm3aDksLBChZzgw1gjUjLQkElR2/xGFMOb9K9RME=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
pythonRelaxDeps = [ "geojson" ];
|
2023-05-24 13:37:59 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
build-system = [ setuptools ];
|
|
|
|
|
|
|
|
nativeBuildInputs = [ pythonRelaxDepsHook ];
|
2023-05-24 13:37:59 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
dependencies = [
|
2021-03-09 03:18:52 +00:00
|
|
|
geojson
|
|
|
|
pysocks
|
|
|
|
requests
|
2024-04-21 15:54:59 +00:00
|
|
|
setuptools
|
2021-03-09 03:18:52 +00:00
|
|
|
];
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
# Run only tests which don't require network access
|
2024-04-21 15:54:59 +00:00
|
|
|
pytestFlagsArray = [ "tests/unit" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
pythonImportsCheck = [ "pyowm" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2021-03-09 03:18:52 +00:00
|
|
|
description = "Python wrapper around the OpenWeatherMap web API";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://pyowm.readthedocs.io/";
|
2024-04-21 15:54:59 +00:00
|
|
|
changelog = "https://github.com/csparpa/pyowm/releases/tag/${version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
2021-03-09 03:18:52 +00:00
|
|
|
maintainers = with maintainers; [ fab ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|