python313Packages.granian: enable checks, add pbsds as maintainer
This commit is contained in:
@@ -2,10 +2,18 @@
|
||||
lib,
|
||||
fetchFromGitHub,
|
||||
rustPlatform,
|
||||
cacert,
|
||||
buildPythonPackage,
|
||||
uvloop,
|
||||
click,
|
||||
libiconv,
|
||||
setproctitle,
|
||||
watchfiles,
|
||||
versionCheckHook,
|
||||
pytestCheckHook,
|
||||
pytest-asyncio,
|
||||
websockets,
|
||||
httpx,
|
||||
sniffio,
|
||||
nix-update-script,
|
||||
}:
|
||||
|
||||
@@ -17,13 +25,12 @@ buildPythonPackage rec {
|
||||
src = fetchFromGitHub {
|
||||
owner = "emmett-framework";
|
||||
repo = "granian";
|
||||
rev = "v${version}";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-YQ9+PcKXtSc+wdvhgDfSAfcv/y53oqcrPCEI9dDKFa0=";
|
||||
};
|
||||
|
||||
cargoDeps = rustPlatform.fetchCargoVendor {
|
||||
inherit src;
|
||||
name = "${pname}-${version}";
|
||||
inherit pname version src;
|
||||
hash = "sha256-XJ61+u5aGQis6YkfASD+WJHEKDBL+2ImqCAuQmm3A/g=";
|
||||
};
|
||||
|
||||
@@ -32,15 +39,42 @@ buildPythonPackage rec {
|
||||
maturinBuildHook
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
libiconv
|
||||
];
|
||||
|
||||
dependencies = [
|
||||
uvloop
|
||||
click
|
||||
];
|
||||
|
||||
optional-dependencies = {
|
||||
pname = [ setproctitle ];
|
||||
reload = [ watchfiles ];
|
||||
# rloop = [ rloop ]; # not packaged
|
||||
uvloop = [ uvloop ];
|
||||
};
|
||||
|
||||
nativeCheckInputs = [
|
||||
versionCheckHook
|
||||
pytestCheckHook
|
||||
pytest-asyncio
|
||||
websockets
|
||||
httpx
|
||||
sniffio
|
||||
];
|
||||
|
||||
preCheck = ''
|
||||
# collides with the one installed in $out
|
||||
rm -rf granian/
|
||||
'';
|
||||
|
||||
# needed for checks
|
||||
env.SSL_CERT_FILE = "${cacert}/etc/ssl/certs/ca-bundle.crt";
|
||||
|
||||
__darwinAllowLocalNetworking = true;
|
||||
|
||||
pytestFlagsArray = [ "tests/" ];
|
||||
|
||||
pythonImportCheck = [ "granian" ];
|
||||
|
||||
versionCheckProgramArg = "--version";
|
||||
|
||||
passthru.updateScript = nix-update-script { };
|
||||
|
||||
meta = {
|
||||
@@ -48,7 +82,10 @@ buildPythonPackage rec {
|
||||
homepage = "https://github.com/emmett-framework/granian";
|
||||
license = lib.licenses.bsd3;
|
||||
mainProgram = "granian";
|
||||
maintainers = with lib.maintainers; [ lucastso10 ];
|
||||
maintainers = with lib.maintainers; [
|
||||
lucastso10
|
||||
pbsds
|
||||
];
|
||||
platforms = lib.platforms.unix;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user