Unverified Commit 784d11dc authored by Martin Weinelt's avatar Martin Weinelt Committed by GitHub
Browse files

home-assistant-custom-components.gtfs-realtime: init at 0.3.2 (#498348)

parents b655a337 ce0d6e4b
Loading
Loading
Loading
Loading
+67 −0
Original line number Diff line number Diff line
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  hatchling,
  aiofiles,
  aiohttp,
  gtfs-realtime-bindings,
  requests,
  freezegun,
  pytest-asyncio,
  pytest-cov-stub,
  pytest-httpserver,
  pytestCheckHook,
  python-dotenv,
  syrupy,
}:

buildPythonPackage (finalAttrs: {
  pname = "gtfs-station-stop";
  version = "0.11.7";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "bcpearce";
    repo = "gtfs-station-stop";
    tag = finalAttrs.version;
    hash = "sha256-Z9pOdLXcNGK1ng7qhzg2J7CvSoDIOczN4P5Es5F2cLs=";
  };

  build-system = [ hatchling ];

  dependencies = [
    aiofiles
    aiohttp
    gtfs-realtime-bindings
    requests
  ];

  # both are added to deps but not used
  pythonRemoveDeps = [
    "asyncio-atexit"
    "coverage-badge"
  ];

  __darwinAllowLocalNetworking = true;

  nativeCheckInputs = [
    freezegun
    pytest-asyncio
    pytest-cov-stub
    pytest-httpserver
    pytestCheckHook
    python-dotenv
    syrupy
  ];

  pythonImportsCheck = [ "gtfs_station_stop" ];

  meta = {
    description = "Python library for Reformatting GTFS data for Station Arrivals";
    homepage = "https://github.com/bcpearce/gtfs-station-stop";
    changelog = "https://github.com/bcpearce/gtfs-station-stop/releases/tag/${finalAttrs.src.tag}";
    license = lib.licenses.mit;
    maintainers = [ lib.maintainers.stepbrobd ];
  };
})
+47 −0
Original line number Diff line number Diff line
{
  lib,
  buildHomeAssistantComponent,
  fetchFromGitHub,
  gtfs-station-stop,
  pytest-cov-stub,
  pytest-freezer,
  pytest-homeassistant-custom-component,
  pytestCheckHook,
}:

buildHomeAssistantComponent rec {
  owner = "bcpearce";
  domain = "gtfs_realtime";
  version = "0.3.2";

  src = fetchFromGitHub {
    owner = "bcpearce";
    repo = "homeassistant-gtfs-realtime";
    tag = version;
    hash = "sha256-G3OtDoF+td7IC+zVXJ+c/chdtYMoq6cStZ3dV8eyUZI=";
  };

  dependencies = [ gtfs-station-stop ];

  nativeCheckInputs = [
    pytest-cov-stub
    pytest-freezer
    pytest-homeassistant-custom-component
    pytestCheckHook
  ];

  disabledTests = [
    # upstream snapshot is stale
    "test_diagnostics"
  ];

  ignoreVersionRequirement = [ "gtfs_station_stop" ];

  meta = {
    changelog = "https://github.com/bcpearce/homeassistant-gtfs-realtime/releases/tag/${src.tag}";
    description = "GTFS Realtime transit arrivals for Home Assistant";
    homepage = "https://github.com/bcpearce/homeassistant-gtfs-realtime";
    license = lib.licenses.mit;
    maintainers = [ lib.maintainers.stepbrobd ];
  };
}
+2 −0
Original line number Diff line number Diff line
@@ -6757,6 +6757,8 @@ self: super: with self; {
  gtfs-realtime-bindings = callPackage ../development/python-modules/gtfs-realtime-bindings { };
  gtfs-station-stop = callPackage ../development/python-modules/gtfs-station-stop { };
  gto = callPackage ../development/python-modules/gto { };
  gtts = callPackage ../development/python-modules/gtts { };