python312Packages.prance: refactor

This commit is contained in:
Fabian Affolter
2024-08-18 10:23:04 +02:00
parent 72a28a35a7
commit 58fa3c0b06
@@ -13,6 +13,7 @@
setuptools-scm,
six,
swagger-spec-validator,
pytest-cov-stub,
pytestCheckHook,
openapi-spec-validator,
}:
@@ -20,26 +21,21 @@
buildPythonPackage rec {
pname = "prance";
version = "23.06.21.0";
format = "pyproject";
pyproject = true;
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "RonnyPfannschmidt";
repo = pname;
rev = "v${version}";
repo = "prance";
rev = "refs/tags/v${version}";
fetchSubmodules = true;
hash = "sha256-p+LZbQal4DPeMp+eJ2O83rCaL+QIUDcU34pZhYdN4bE=";
};
postPatch = ''
substituteInPlace setup.cfg \
--replace "--cov=prance --cov-report=term-missing --cov-fail-under=90" ""
'';
build-system = [ setuptools-scm ];
nativeBuildInputs = [ setuptools-scm ];
propagatedBuildInputs = [
dependencies = [
chardet
packaging
requests
@@ -56,6 +52,7 @@ buildPythonPackage rec {
};
nativeCheckInputs = [
pytest-cov-stub
pytestCheckHook
] ++ lib.flatten (lib.attrValues passthru.optional-dependencies);
@@ -70,11 +67,11 @@ buildPythonPackage rec {
pythonImportsCheck = [ "prance" ];
meta = with lib; {
changelog = "https://github.com/RonnyPfannschmidt/prance/blob/${src.rev}/CHANGES.rst";
description = "Resolving Swagger/OpenAPI 2.0 and 3.0.0 Parser";
mainProgram = "prance";
homepage = "https://github.com/RonnyPfannschmidt/prance";
changelog = "https://github.com/RonnyPfannschmidt/prance/blob/${src.rev}/CHANGES.rst";
license = licenses.mit;
maintainers = [ ];
mainProgram = "prance";
};
}