mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-09-20 12:29:02 +02:00
python311Packages.aioesphomeapi: refactor
- reorganize argument list - build optional cython module - convert to pep517 build
This commit is contained in:
parent
f36961c0bd
commit
a1e00e2f5d
|
@ -1,21 +1,29 @@
|
|||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, pythonOlder
|
||||
|
||||
# build-system
|
||||
, cython_3
|
||||
, setuptools
|
||||
|
||||
# dependencies
|
||||
, async-timeout
|
||||
, chacha20poly1305-reuseable
|
||||
, mock
|
||||
, noiseprotocol
|
||||
, protobuf
|
||||
, zeroconf
|
||||
|
||||
# tests
|
||||
, mock
|
||||
, pytest-asyncio
|
||||
, pytestCheckHook
|
||||
, pythonOlder
|
||||
, zeroconf
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "aioesphomeapi";
|
||||
version = "18.2.0";
|
||||
format = "setuptools";
|
||||
pyproject = true;
|
||||
|
||||
disabled = pythonOlder "3.9";
|
||||
|
||||
|
@ -26,28 +34,33 @@ buildPythonPackage rec {
|
|||
hash = "sha256-uOF9VSASzGA4pVW3puQtGrr2dy7sRESa1a6DPUsMmL4=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
setuptools
|
||||
cython_3
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
async-timeout
|
||||
chacha20poly1305-reuseable
|
||||
noiseprotocol
|
||||
protobuf
|
||||
zeroconf
|
||||
] ++ lib.optionals (pythonOlder "3.11") [
|
||||
async-timeout
|
||||
];
|
||||
|
||||
pythonImportsCheck = [
|
||||
"aioesphomeapi"
|
||||
];
|
||||
nativeCheckInputs = [
|
||||
mock
|
||||
pytest-asyncio
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
pythonImportsCheck = [
|
||||
"aioesphomeapi"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
changelog = "https://github.com/esphome/aioesphomeapi/releases/tag/v${version}";
|
||||
description = "Python Client for ESPHome native API";
|
||||
homepage = "https://github.com/esphome/aioesphomeapi";
|
||||
changelog = "https://github.com/esphome/aioesphomeapi/releases/tag/v${version}";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ fab hexa ];
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue