mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-08-25 17:55:21 +00:00
Merge pull request #120447 from AluisioASG/aasg/dyndnsc-0.6.1
dyndnsc: 0.5.1 -> 0.6.1
This commit is contained in:
49
pkgs/development/python-modules/json-logging/default.nix
Normal file
49
pkgs/development/python-modules/json-logging/default.nix
Normal file
@@ -0,0 +1,49 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, fetchpatch
|
||||
, pytestCheckHook
|
||||
, wheel
|
||||
, flask
|
||||
, sanic
|
||||
, fastapi
|
||||
, uvicorn
|
||||
, requests
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "json-logging";
|
||||
version = "1.3.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "bobbui";
|
||||
repo = "json-logging-python";
|
||||
rev = version;
|
||||
hash = "sha256-0eIhOi30r3ApyVkiBdTQps5tNj7rI+q8TjNWxTnhtMQ=";
|
||||
};
|
||||
patches = [
|
||||
# Fix tests picking up test modules instead of real packages.
|
||||
(fetchpatch {
|
||||
url = "https://github.com/bobbui/json-logging-python/commit/6fdb64deb42fe48b0b12bda0442fd5ac5f03107f.patch";
|
||||
sha256 = "sha256-BLfARsw2FdvY22NCaFfdFgL9wTmEZyVIi3CQpB5qU0Y=";
|
||||
})
|
||||
];
|
||||
|
||||
# - Quart is not packaged for Nixpkgs.
|
||||
# - FastAPI is broken, see #112701 and tiangolo/fastapi#2335.
|
||||
checkInputs = [ wheel flask /*quart*/ sanic /*fastapi*/ uvicorn requests pytestCheckHook ];
|
||||
disabledTests = [ "quart" "fastapi" ];
|
||||
disabledTestPaths = [ "tests/test_fastapi.py" ];
|
||||
# Tests spawn servers and try to connect to them.
|
||||
__darwinAllowLocalNetworking = true;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Python library to emit logs in JSON format";
|
||||
longDescription = ''
|
||||
Python logging library to emit JSON log that can be easily indexed and searchable by logging infrastructure such as ELK, EFK, AWS Cloudwatch, GCP Stackdriver.
|
||||
'';
|
||||
homepage = "https://github.com/bobbui/json-logging-python";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ AluisioASG ];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, pytestCheckHook
|
||||
, python
|
||||
, mock
|
||||
, setuptools-scm
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "pytest-console-scripts";
|
||||
version = "1.2.0";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "4a2138d7d567bc581fe081b6a5975849a2a36b3925cb0f066d2380103e13741c";
|
||||
};
|
||||
postPatch = ''
|
||||
# setuptools-scm is pinned to <6 because it dropped Python 3.5
|
||||
# support. That's not something that affects us.
|
||||
substituteInPlace setup.py --replace "'setuptools_scm<6'" "'setuptools_scm'"
|
||||
# Patch the shebang of a script generated during test.
|
||||
substituteInPlace tests/test_run_scripts.py --replace "#!/usr/bin/env python" "#!${python.interpreter}"
|
||||
'';
|
||||
|
||||
SETUPTOOLS_SCM_PRETEND_VERSION = version;
|
||||
nativeBuildInputs = [ setuptools-scm ];
|
||||
|
||||
checkInputs = [ mock pytestCheckHook ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Pytest plugin for testing console scripts";
|
||||
longDescription = ''
|
||||
Pytest-console-scripts is a pytest plugin for running python scripts from within tests.
|
||||
It's quite similar to subprocess.run(), but it also has an in-process mode, where the scripts are executed by the interpreter that's running pytest (using some amount of sandboxing).
|
||||
'';
|
||||
homepage = "https://github.com/kvas-it/pytest-console-scripts";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ AluisioASG ];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user