python313Packages.flask-dramatiq: refactor

This commit is contained in:
Fabian Affolter 2025-08-12 10:35:45 +02:00
parent f6cf3fc2d9
commit bf1df1d967

View File

@ -1,27 +1,25 @@
{ {
lib, lib,
buildPythonPackage, buildPythonPackage,
pythonOlder,
fetchFromGitLab,
poetry-core,
dramatiq, dramatiq,
flask, fetchFromGitLab,
requests,
pytestCheckHook,
pytest-cov-stub,
flask-migrate, flask-migrate,
flask,
periodiq, periodiq,
poetry-core,
postgresql, postgresql,
postgresqlTestHook, postgresqlTestHook,
psycopg2, psycopg2,
pytest-cov-stub,
pytest-mock,
pytestCheckHook,
requests,
}: }:
buildPythonPackage { buildPythonPackage {
pname = "flask-dramatiq"; pname = "flask-dramatiq";
version = "0.6.0"; version = "0.6.0";
format = "pyproject"; pyproject = true;
disabled = pythonOlder "3.6";
src = fetchFromGitLab { src = fetchFromGitLab {
owner = "bersace"; owner = "bersace";
@ -38,20 +36,21 @@ buildPythonPackage {
patchShebangs --build ./example.py patchShebangs --build ./example.py
''; '';
nativeBuildInputs = [ poetry-core ]; build-system = [ poetry-core ];
propagatedBuildInputs = [ dramatiq ]; dependencies = [ dramatiq ];
nativeCheckInputs = [ nativeCheckInputs = [
pytestCheckHook
pytest-cov-stub
flask flask
requests
flask-migrate flask-migrate
periodiq periodiq
postgresql postgresql
postgresqlTestHook postgresqlTestHook
psycopg2 psycopg2
pytest-cov-stub
pytest-mock
pytestCheckHook
requests
] ]
++ dramatiq.optional-dependencies.rabbitmq; ++ dramatiq.optional-dependencies.rabbitmq;
@ -62,23 +61,13 @@ buildPythonPackage {
python3 ./example.py db upgrade python3 ./example.py db upgrade
''; '';
pytestFlags = [
"-x"
];
disabledTestPaths = [
"tests/func/"
"tests/unit"
];
pythonImportsCheck = [ "flask_dramatiq" ];
# Does HTTP requests to localhost
disabledTests = [ disabledTests = [
"test_fast" "test_fast"
"test_other" "test_other"
]; ];
pythonImportsCheck = [ "flask_dramatiq" ];
meta = with lib; { meta = with lib; {
description = "Adds Dramatiq support to your Flask application"; description = "Adds Dramatiq support to your Flask application";
homepage = "https://gitlab.com/bersace/flask-dramatiq"; homepage = "https://gitlab.com/bersace/flask-dramatiq";