python311Packages.govee-ble: refactor

This commit is contained in:
Fabian Affolter 2024-01-31 20:27:05 +01:00
parent 0ef9ed4cf5
commit d674b3be63

View File

@ -13,17 +13,22 @@
buildPythonPackage rec { buildPythonPackage rec {
pname = "govee-ble"; pname = "govee-ble";
version = "0.31.0"; version = "0.31.0";
format = "pyproject"; pyproject = true;
disabled = pythonOlder "3.9"; disabled = pythonOlder "3.9";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "Bluetooth-Devices"; owner = "Bluetooth-Devices";
repo = pname; repo = "govee-ble";
rev = "refs/tags/v${version}"; rev = "refs/tags/v${version}";
hash = "sha256-g4tOu4nrJx1DVk2KLfF6HIEM7vTkfBg2fd7R1j+Xwrk="; hash = "sha256-g4tOu4nrJx1DVk2KLfF6HIEM7vTkfBg2fd7R1j+Xwrk=";
}; };
postPatch = ''
substituteInPlace pyproject.toml \
--replace " --cov=govee_ble --cov-report=term-missing:skip-covered" ""
'';
nativeBuildInputs = [ nativeBuildInputs = [
poetry-core poetry-core
]; ];
@ -39,11 +44,6 @@ buildPythonPackage rec {
pytestCheckHook pytestCheckHook
]; ];
postPatch = ''
substituteInPlace pyproject.toml \
--replace " --cov=govee_ble --cov-report=term-missing:skip-covered" ""
'';
pythonImportsCheck = [ pythonImportsCheck = [
"govee_ble" "govee_ble"
]; ];