Unverified Commit 083b4e95 authored by Fabian Affolter's avatar Fabian Affolter Committed by GitHub
Browse files

Merge pull request #236743 from fabaff/python-opensky

python311Packages.python-opensky: init at 0.0.9
parents 1773d7ef cbea2db5
Loading
Loading
Loading
Loading
+63 −0
Original line number Diff line number Diff line
{ lib
, aiohttp
, aresponses
, buildPythonPackage
, fetchFromGitHub
, poetry-core
, pydantic
, pytest-asyncio
, pytestCheckHook
, pythonOlder
, yarl
}:

buildPythonPackage rec {
  pname = "python-opensky";
  version = "0.0.9";
  format = "pyproject";

  disabled = pythonOlder "3.10";

  src = fetchFromGitHub {
    owner = "joostlek";
    repo = "python-opensky";
    rev = "refs/tags/v${version}";
    hash = "sha256-Fe0Ra4C4pM1+8ZZFv4yL0RKcUVOZ7Zk78i2ejBmkB/8=";
  };

  postPatch = ''
    substituteInPlace pyproject.toml \
      --replace 'version = "0.0.0"' 'version = "${version}"' \
      --replace "--cov" ""
    substituteInPlace src/python_opensky/opensky.py \
      --replace ".joinpath(uri)" "/ uri"
  '';

  nativeBuildInputs = [
    poetry-core
  ];

  propagatedBuildInputs = [
    aiohttp
    pydantic
    yarl
  ];

  nativeCheckInputs = [
    aresponses
    pytest-asyncio
    pytestCheckHook
  ];

  pythonImportsCheck = [
    "python_opensky"
  ];

  meta = with lib; {
    description = "Asynchronous Python client for the OpenSky API";
    homepage = "https://github.com/joostlek/python-opensky";
    changelog = "https://github.com/joostlek/python-opensky/releases/tag/v${version}";
    license = licenses.mit;
    maintainers = with maintainers; [ fab ];
  };
}
+2 −0
Original line number Diff line number Diff line
@@ -7817,6 +7817,8 @@ self: super: with self; {

  python-openems = callPackage ../development/python-modules/python-openems { };

  python-opensky = callPackage ../development/python-modules/python-opensky { };

  python-openzwave-mqtt = callPackage ../development/python-modules/python-openzwave-mqtt { };

  python-owasp-zap-v2-4 = callPackage ../development/python-modules/python-owasp-zap-v2-4 { };