summaryrefslogtreecommitdiff
path: root/dev-python/flasgger
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/flasgger')
-rw-r--r--dev-python/flasgger/Manifest1
-rw-r--r--dev-python/flasgger/files/flasgger-0.9.7.1-click-8.2.patch36
-rw-r--r--dev-python/flasgger/flasgger-0.9.7.1.ebuild44
-rw-r--r--dev-python/flasgger/metadata.xml9
4 files changed, 90 insertions, 0 deletions
diff --git a/dev-python/flasgger/Manifest b/dev-python/flasgger/Manifest
new file mode 100644
index 000000000000..bf46ca0ab2f9
--- /dev/null
+++ b/dev-python/flasgger/Manifest
@@ -0,0 +1 @@
+DIST flasgger-0.9.7.1.tar.gz 3979409 BLAKE2B 939b0adfdfa3fcc8305320c6a140ef378e5617d46743e1cae04093e8391b782b73d4f112174ed1e29711fbf55a7469ffe6008beff9a218f5eaa68bb8864ced1c SHA512 fe1feb5ebadc6c3cde8e9e70726c86efc8d88392c5eb44ddaa6135fa96fbaada975d2042187bd4cebe08d843d21dc8e89dea5f2935b6c65863b36e4a6a39d121
diff --git a/dev-python/flasgger/files/flasgger-0.9.7.1-click-8.2.patch b/dev-python/flasgger/files/flasgger-0.9.7.1-click-8.2.patch
new file mode 100644
index 000000000000..e66324012d0a
--- /dev/null
+++ b/dev-python/flasgger/files/flasgger-0.9.7.1-click-8.2.patch
@@ -0,0 +1,36 @@
+https://github.com/flasgger/flasgger/pull/633
+
+From 08591b60e988c0002fcf1b1e9f98b78e041d2732 Mon Sep 17 00:00:00 2001
+From: Colin Watson <cjwatson@debian.org>
+Date: Tue, 4 Mar 2025 10:13:55 +0000
+Subject: [PATCH] Fix tests with Click 8.2
+
+https://github.com/pallets/click/pull/2523 introduced changes to
+`click.testing` that broke a few unit tests in Flasgger:
+`mix_stderr=False` is now effectively the default and can no longer be
+specified explicitly. Although this Click version hasn't been fully
+released yet, this adjusts Flasgger to work with both old and new
+versions.
+--- a/tests/conftest.py
++++ b/tests/conftest.py
+@@ -1,7 +1,9 @@
++import inspect
+ import json
+ import random
+
+ import pytest
++from click.testing import CliRunner
+ from flasgger import Swagger
+ from flasgger.utils import get_examples
+
+@@ -99,4 +101,8 @@ def app():
+
+ @pytest.fixture(scope="function")
+ def cli_runner(app):
+- yield app.test_cli_runner(mix_stderr=False)
++ kwargs = {}
++ if "mix_stderr" in inspect.signature(CliRunner).parameters:
++ # click < 8.2
++ kwargs["mix_stderr"] = False
++ yield app.test_cli_runner(**kwargs)
+
diff --git a/dev-python/flasgger/flasgger-0.9.7.1.ebuild b/dev-python/flasgger/flasgger-0.9.7.1.ebuild
new file mode 100644
index 000000000000..d98b5a1d5dcf
--- /dev/null
+++ b/dev-python/flasgger/flasgger-0.9.7.1.ebuild
@@ -0,0 +1,44 @@
+# Copyright 2023-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{13..14} )
+
+inherit distutils-r1 pypi
+
+DESCRIPTION="Easy OpenAPI specs and Swagger UI for your Flask API"
+HOMEPAGE="
+ https://github.com/flasgger/flasgger/
+ https://pypi.org/project/flasgger/
+"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="amd64 arm arm64 ~loong ~mips ppc ppc64 ~riscv ~s390 ~sparc x86"
+
+RDEPEND="
+ >=dev-python/flask-0.10[${PYTHON_USEDEP}]
+ >=dev-python/pyyaml-3.0[${PYTHON_USEDEP}]
+ >=dev-python/jsonschema-3.0.1[${PYTHON_USEDEP}]
+ dev-python/mistune[${PYTHON_USEDEP}]
+ >=dev-python/six-1.10.0[${PYTHON_USEDEP}]
+ dev-python/packaging[${PYTHON_USEDEP}]
+"
+
+PATCHES=(
+ # https://github.com/flasgger/flasgger/pull/633
+ "${FILESDIR}/${PN}-0.9.7.1-click-8.2.patch"
+)
+
+distutils_enable_tests pytest
+
+python_test() {
+ local EPYTEST_IGNORE=(
+ # requires flex
+ tests/test_examples.py
+ )
+
+ epytest tests
+}
diff --git a/dev-python/flasgger/metadata.xml b/dev-python/flasgger/metadata.xml
new file mode 100644
index 000000000000..d34971a915e9
--- /dev/null
+++ b/dev-python/flasgger/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://docs.baldeagleos.com/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>python@gentoo.org</email>
+ </maintainer>
+ <stabilize-allarches />
+ <origin>baldeagleos-repo</origin>
+</pkgmetadata>