python3Packages.aiohttp-swagger: modernize

This commit is contained in:
jopejoe1
2025-05-02 20:58:27 +02:00
parent 9046f44064
commit 914592a83e
@@ -2,6 +2,7 @@
lib,
buildPythonPackage,
fetchFromGitHub,
setuptools,
aiohttp,
jinja2,
markupsafe,
@@ -14,18 +15,22 @@
buildPythonPackage rec {
pname = "aiohttp-swagger";
version = "1.0.15";
format = "setuptools";
pyproject = true;
disabled = pythonOlder "3.6";
src = fetchFromGitHub {
owner = "cr0hn";
repo = pname;
rev = version;
repo = "aiohttp-swagger";
tag = version;
hash = "sha256-M43sNpbXWXFRTd549cZhvhO35nBB6OH+ki36BzSk87Q=";
};
propagatedBuildInputs = [
build-system = [
setuptools
];
dependencies = [
aiohttp
jinja2
markupsafe
@@ -37,22 +42,20 @@ buildPythonPackage rec {
pytest-aiohttp
];
postPatch = ''
substituteInPlace requirements.txt \
--replace "markupsafe~=1.1.1" "markupsafe>=1.1.1" \
--replace "jinja2~=2.11.2" "jinja2>=2.11.2"
'';
pythonRelaxDeps = [
"markupsafe"
"jinja2"
];
preCheck = ''
# The custom client is obsolete
rm tests/conftest.py
'';
disabledTestPaths = [
"tests/conftest.py"
];
pythonImportsCheck = [ "aiohttp_swagger" ];
meta = with lib; {
meta = {
description = "Swagger API Documentation builder for aiohttp";
homepage = "https://github.com/cr0hn/aiohttp-swagger";
license = licenses.mit;
license = lib.licenses.mit;
};
}