python312Packages.ssdp: refactor (#386760)

This commit is contained in:
Nick Cao
2025-03-03 16:41:33 -05:00
committed by GitHub
@@ -1,9 +1,12 @@
{
lib,
buildPythonPackage,
click,
fetchFromGitHub,
flit-core,
flit-scm,
pygments,
pytest-cov-stub,
pytestCheckHook,
pythonOlder,
}:
@@ -11,37 +14,43 @@
buildPythonPackage rec {
pname = "ssdp";
version = "1.3.0";
format = "pyproject";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "codingjoe";
repo = pname;
repo = "ssdp";
tag = version;
hash = "sha256-mORjMEg7Q/2CKZBLICSGF8dcdl98S6mBgJ4jujPGs6M=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace "--cov" ""
'';
nativeBuildInputs = [
build-system = [
flit-core
flit-scm
];
nativeCheckInputs = [ pytestCheckHook ];
optional-dependencies = {
cli = [
click
pygments
];
pygments = [ pygments ];
};
nativeCheckInputs = [
pytest-cov-stub
pytestCheckHook
];
pythonImportsCheck = [ "ssdp" ];
meta = with lib; {
description = "Python asyncio library for Simple Service Discovery Protocol (SSDP)";
mainProgram = "ssdp";
homepage = "https://github.com/codingjoe/ssdp";
changelog = "https://github.com/codingjoe/ssdp/releases/tag/${version}";
license = licenses.mit;
maintainers = with maintainers; [ fab ];
mainProgram = "ssdp";
};
}