python3Packages.viaggiatreno-ha: init at 0.2.4
Viaggiatreno API wrapper for querying Trenitalia ViaggiaTreno API, used by the Home Assistant viaggiatreno integration. https://github.com/monga/viaggiatreno_ha https://pypi.org/project/viaggiatreno-ha
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
{
|
||||
lib,
|
||||
aiohttp,
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
pytestCheckHook,
|
||||
setuptools,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "viaggiatreno-ha";
|
||||
version = "0.2.4";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "monga";
|
||||
repo = "viaggiatreno_ha";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-XmZVguuZK4pnAqINBWJbyAa5VesrQS6wP1jNPdWqhiQ=";
|
||||
};
|
||||
|
||||
build-system = [ setuptools ];
|
||||
|
||||
dependencies = [ aiohttp ];
|
||||
|
||||
nativeCheckInputs = [ pytestCheckHook ];
|
||||
|
||||
preCheck = ''
|
||||
cd tests
|
||||
'';
|
||||
|
||||
# Tests use aiohttp's AioHTTPTestCase which starts a local TCP server
|
||||
__darwinAllowLocalNetworking = true;
|
||||
|
||||
pythonImportsCheck = [ "viaggiatreno_ha" ];
|
||||
|
||||
meta = {
|
||||
changelog = "https://github.com/monga/viaggiatreno_ha/releases/tag/${src.tag}";
|
||||
description = "Viaggiatreno API wrapper to use with Home Assistant";
|
||||
homepage = "https://github.com/monga/viaggiatreno_ha";
|
||||
license = lib.licenses.gpl3Plus;
|
||||
maintainers = [ lib.maintainers.jamiemagee ];
|
||||
};
|
||||
}
|
||||
@@ -20444,6 +20444,8 @@ self: super: with self; {
|
||||
|
||||
vharfbuzz = callPackage ../development/python-modules/vharfbuzz { };
|
||||
|
||||
viaggiatreno-ha = callPackage ../development/python-modules/viaggiatreno-ha { };
|
||||
|
||||
victron-vrm = callPackage ../development/python-modules/victron-vrm { };
|
||||
|
||||
videocr = callPackage ../development/python-modules/videocr { };
|
||||
|
||||
Reference in New Issue
Block a user