biome: 1.9.2 -> 1.9.3 (#349335)
[NixPkgs.git] / pkgs / development / python-modules / python-opensky / default.nix
blobbef8dadf3186331f8a01e36235a110ea70cbc4ba
2   lib,
3   aiohttp,
4   aresponses,
5   buildPythonPackage,
6   fetchFromGitHub,
7   poetry-core,
8   pydantic,
9   pytest-asyncio,
10   pytestCheckHook,
11   pythonOlder,
12   syrupy,
13   yarl,
16 buildPythonPackage rec {
17   pname = "python-opensky";
18   version = "1.0.1";
19   pyproject = true;
21   disabled = pythonOlder "3.11";
23   src = fetchFromGitHub {
24     owner = "joostlek";
25     repo = "python-opensky";
26     rev = "refs/tags/v${version}";
27     hash = "sha256-V6iRwWzCnPCvu8eks2sHPYrX3OmaFnNj+i57kQJKYm0=";
28   };
30   postPatch = ''
31     substituteInPlace pyproject.toml \
32       --replace 'version = "0.0.0"' 'version = "${version}"' \
33       --replace "--cov" ""
34     substituteInPlace src/python_opensky/opensky.py \
35       --replace ".joinpath(uri)" "/ uri"
36   '';
38   nativeBuildInputs = [ poetry-core ];
40   propagatedBuildInputs = [
41     aiohttp
42     pydantic
43     yarl
44   ];
46   nativeCheckInputs = [
47     aresponses
48     pytest-asyncio
49     pytestCheckHook
50     syrupy
51   ];
53   pythonImportsCheck = [ "python_opensky" ];
55   meta = with lib; {
56     description = "Asynchronous Python client for the OpenSky API";
57     homepage = "https://github.com/joostlek/python-opensky";
58     changelog = "https://github.com/joostlek/python-opensky/releases/tag/v${version}";
59     license = licenses.mit;
60     maintainers = with maintainers; [ fab ];
61   };