depot/third_party/nixpkgs/pkgs/development/python-modules/prance/default.nix
Default email 02cf88bb76 Project import generated by Copybara.
GitOrigin-RevId: c4a0efdd5a728e20791b8d8d2f26f90ac228ee8d
2022-08-12 15:06:08 +03:00

67 lines
1.3 KiB
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, chardet
, requests
, ruamel-yaml
, setuptools-scm
, six
, semver
, pytestCheckHook
, openapi-spec-validator
}:
buildPythonPackage rec {
pname = "prance";
version = "0.21.8.0";
format = "pyproject";
src = fetchFromGitHub {
owner = "RonnyPfannschmidt";
repo = pname;
rev = "v${version}";
fetchSubmodules = true;
sha256 = "sha256-kGANMHfWwhW3ZBw2ZVCJZR/bV2EPhcydMKhDeDTVwcQ=";
};
postPatch = ''
substituteInPlace setup.cfg \
--replace "--cov=prance --cov-report=term-missing --cov-fail-under=90" "" \
--replace "chardet>=3.0,<5.0" "chardet"
'';
SETUPTOOLS_SCM_PRETEND_VERSION = version;
nativeBuildInputs = [
setuptools-scm
];
propagatedBuildInputs = [
chardet
requests
ruamel-yaml
six
semver
];
checkInputs = [
pytestCheckHook
openapi-spec-validator
];
# Disable tests that require network
disabledTestPaths = [
"tests/test_convert.py"
];
disabledTests = [
"test_fetch_url_http"
];
pythonImportsCheck = [ "prance" ];
meta = with lib; {
description = "Resolving Swagger/OpenAPI 2.0 and 3.0.0 Parser";
homepage = "https://github.com/RonnyPfannschmidt/prance";
license = licenses.mit;
maintainers = [ maintainers.costrouc ];
};
}