mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-10 14:14:20 +00:00
Merge pull request #219921 from dotlambda/openapi-core-0.17.0
python310Packages.openapi-core: 0.16.6 -> 0.17.0
This commit is contained in:
commit
5046c93ec0
@ -13,14 +13,14 @@
|
|||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "apispec";
|
pname = "apispec";
|
||||||
version = "6.1.0";
|
version = "6.2.0";
|
||||||
format = "setuptools";
|
format = "setuptools";
|
||||||
|
|
||||||
disabled = pythonOlder "3.7";
|
disabled = pythonOlder "3.7";
|
||||||
|
|
||||||
src = fetchPypi {
|
src = fetchPypi {
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
hash = "sha256-iB07kL//3tZZvApL8J6t7t+iVs0nFyaxVV11r54Kmmk=";
|
hash = "sha256-GpSaYLtMQr7leqr11DwYTfPi6W2WWORC513UQ1z2CWE=";
|
||||||
};
|
};
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
@ -37,7 +37,7 @@ buildPythonPackage rec {
|
|||||||
validation = [
|
validation = [
|
||||||
openapi-spec-validator
|
openapi-spec-validator
|
||||||
prance
|
prance
|
||||||
];
|
] ++ prance.optional-dependencies.osv;
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeCheckInputs = [
|
nativeCheckInputs = [
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "openapi-core";
|
pname = "openapi-core";
|
||||||
version = "0.16.6";
|
version = "0.17.0";
|
||||||
format = "pyproject";
|
format = "pyproject";
|
||||||
|
|
||||||
disabled = pythonOlder "3.7";
|
disabled = pythonOlder "3.7";
|
||||||
@ -36,7 +36,7 @@ buildPythonPackage rec {
|
|||||||
owner = "p1c2u";
|
owner = "p1c2u";
|
||||||
repo = "openapi-core";
|
repo = "openapi-core";
|
||||||
rev = "refs/tags/${version}";
|
rev = "refs/tags/${version}";
|
||||||
hash = "sha256-cpWEZ+gX4deTxMQ5BG+Qh863jcqUkOlNSY3KtOwOcBo=";
|
hash = "sha256-LxCaP8r+89UmV/VfqtA/mWV/CXd6ZfRQnNnM0Jde7ko=";
|
||||||
};
|
};
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
@ -84,11 +84,7 @@ buildPythonPackage rec {
|
|||||||
pytestCheckHook
|
pytestCheckHook
|
||||||
responses
|
responses
|
||||||
webob
|
webob
|
||||||
] ++ passthru.optional-dependencies.flask
|
] ++ lib.flatten (lib.attrValues passthru.optional-dependencies);
|
||||||
++ passthru.optional-dependencies.falcon
|
|
||||||
++ passthru.optional-dependencies.django
|
|
||||||
++ passthru.optional-dependencies.starlette
|
|
||||||
++ passthru.optional-dependencies.requests;
|
|
||||||
|
|
||||||
disabledTestPaths = [
|
disabledTestPaths = [
|
||||||
# Requires secrets and additional configuration
|
# Requires secrets and additional configuration
|
||||||
|
@ -5,31 +5,38 @@
|
|||||||
, pytestCheckHook
|
, pytestCheckHook
|
||||||
, isodate
|
, isodate
|
||||||
, jsonschema
|
, jsonschema
|
||||||
, pytest-cov
|
|
||||||
, rfc3339-validator
|
, rfc3339-validator
|
||||||
, six
|
|
||||||
, strict-rfc3339
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "openapi-schema-validator";
|
pname = "openapi-schema-validator";
|
||||||
version = "0.3.4";
|
version = "0.4.3";
|
||||||
format = "pyproject";
|
format = "pyproject";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "p1c2u";
|
owner = "p1c2u";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = "refs/tags/${version}";
|
rev = "refs/tags/${version}";
|
||||||
sha256 = "sha256-0nKAeqZCfzYFsV18BDsSws/54FmRoy7lQSHguI6m3Sc=";
|
hash = "sha256-rp0Oq5WWPpna5rHrq/lfRNxjK5/FLgPZ5uzVfDT/YiI=";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
sed -i "/--cov/d" pyproject.toml
|
||||||
|
'';
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
poetry-core
|
poetry-core
|
||||||
];
|
];
|
||||||
|
|
||||||
propagatedBuildInputs = [ isodate jsonschema six strict-rfc3339 rfc3339-validator ];
|
propagatedBuildInputs = [
|
||||||
|
jsonschema
|
||||||
|
rfc3339-validator
|
||||||
|
];
|
||||||
|
|
||||||
|
nativeCheckInputs = [
|
||||||
|
pytestCheckHook
|
||||||
|
];
|
||||||
|
|
||||||
nativeCheckInputs = [ pytestCheckHook pytest-cov ];
|
|
||||||
pythonImportsCheck = [ "openapi_schema_validator" ];
|
pythonImportsCheck = [ "openapi_schema_validator" ];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
{ lib
|
{ lib
|
||||||
, buildPythonPackage
|
, buildPythonPackage
|
||||||
|
, pythonOlder
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, poetry-core
|
, poetry-core
|
||||||
, setuptools
|
|
||||||
|
|
||||||
# propagates
|
# propagates
|
||||||
, importlib-resources
|
, importlib-resources
|
||||||
@ -22,29 +22,30 @@
|
|||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "openapi-spec-validator";
|
pname = "openapi-spec-validator";
|
||||||
version = "0.5.1";
|
version = "0.5.5";
|
||||||
format = "pyproject";
|
format = "pyproject";
|
||||||
|
|
||||||
|
disabled = pythonOlder "3.7";
|
||||||
|
|
||||||
# no tests via pypi sdist
|
# no tests via pypi sdist
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "p1c2u";
|
owner = "p1c2u";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = version;
|
rev = version;
|
||||||
hash = "sha256-8VhD57dNG0XrPUdcq39GEfHUAgdDwJ8nv+Lp57OpTLg=";
|
hash = "sha256-t7u0p6V2woqIFsqywv7k5s5pbbnmcn45YnlFWH1PEi4=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
poetry-core
|
poetry-core
|
||||||
setuptools
|
|
||||||
];
|
];
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
importlib-resources
|
|
||||||
jsonschema
|
jsonschema
|
||||||
jsonschema-spec
|
jsonschema-spec
|
||||||
lazy-object-proxy
|
lazy-object-proxy
|
||||||
openapi-schema-validator
|
openapi-schema-validator
|
||||||
pyyaml
|
] ++ lib.optionals (pythonOlder "3.9") [
|
||||||
|
importlib-resources
|
||||||
];
|
];
|
||||||
|
|
||||||
passthru.optional-dependencies.requests = [
|
passthru.optional-dependencies.requests = [
|
||||||
|
@ -1,54 +1,39 @@
|
|||||||
{ lib
|
{ lib
|
||||||
, buildPythonPackage
|
, buildPythonPackage
|
||||||
|
, pythonOlder
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, fetchpatch
|
|
||||||
, chardet
|
, chardet
|
||||||
|
, click
|
||||||
|
, flex
|
||||||
|
, packaging
|
||||||
|
, pyicu
|
||||||
, requests
|
, requests
|
||||||
, ruamel-yaml
|
, ruamel-yaml
|
||||||
, setuptools-scm
|
, setuptools-scm
|
||||||
, six
|
, six
|
||||||
, semver
|
, swagger-spec-validator
|
||||||
, pytestCheckHook
|
, pytestCheckHook
|
||||||
, openapi-spec-validator
|
, openapi-spec-validator
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "prance";
|
pname = "prance";
|
||||||
version = "0.21.8.0";
|
version = "0.22.02.22.0";
|
||||||
format = "pyproject";
|
format = "pyproject";
|
||||||
|
|
||||||
|
disabled = pythonOlder "3.8";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "RonnyPfannschmidt";
|
owner = "RonnyPfannschmidt";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
fetchSubmodules = true;
|
fetchSubmodules = true;
|
||||||
hash = "sha256-kGANMHfWwhW3ZBw2ZVCJZR/bV2EPhcydMKhDeDTVwcQ=";
|
hash = "sha256-NtIbZp34IcMYJzaNQVL9GLdNS3NYOCRoWS1wGg/gLVA=";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [
|
|
||||||
# Fix for openapi-spec-validator 0.5.0+:
|
|
||||||
# https://github.com/RonnyPfannschmidt/prance/pull/132
|
|
||||||
(fetchpatch {
|
|
||||||
name = "1-openapi-spec-validator-upgrade.patch";
|
|
||||||
url = "https://github.com/RonnyPfannschmidt/prance/commit/55503c9b12b685863c932ededac996369e7d288a.patch";
|
|
||||||
hash = "sha256-7SOgFsk2aaaaAYS8WJ9axqQFyEprurn6Zn12NcdQ9Bg=";
|
|
||||||
})
|
|
||||||
(fetchpatch {
|
|
||||||
name = "2-openapi-spec-validator-upgrade.patch";
|
|
||||||
url = "https://github.com/RonnyPfannschmidt/prance/commit/7e59cc69c6c62fd04875105773d9d220bb58fea6.patch";
|
|
||||||
hash = "sha256-j6vmY3NqDswp7v9682H+/MxMGtFObMxUeL9Wbiv9hYw=";
|
|
||||||
})
|
|
||||||
(fetchpatch {
|
|
||||||
name = "3-openapi-spec-validator-upgrade.patch";
|
|
||||||
url = "https://github.com/RonnyPfannschmidt/prance/commit/7e575781d83845d7ea0c2eff57644df9b465c7af.patch";
|
|
||||||
hash = "sha256-rexKoQ+TH3QmP20c3bA+7BLMLc+fkVhn7xsq+gle1Aw=";
|
|
||||||
})
|
|
||||||
];
|
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
substituteInPlace setup.cfg \
|
substituteInPlace setup.cfg \
|
||||||
--replace "--cov=prance --cov-report=term-missing --cov-fail-under=90" "" \
|
--replace "--cov=prance --cov-report=term-missing --cov-fail-under=90" ""
|
||||||
--replace "chardet>=3.0,<5.0" "chardet"
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
SETUPTOOLS_SCM_PRETEND_VERSION = version;
|
SETUPTOOLS_SCM_PRETEND_VERSION = version;
|
||||||
@ -59,27 +44,37 @@ buildPythonPackage rec {
|
|||||||
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
chardet
|
chardet
|
||||||
|
packaging
|
||||||
requests
|
requests
|
||||||
ruamel-yaml
|
ruamel-yaml
|
||||||
six
|
six
|
||||||
semver
|
|
||||||
];
|
];
|
||||||
|
|
||||||
|
passthru.optional-dependencies = {
|
||||||
|
cli = [ click ];
|
||||||
|
flex = [ flex ];
|
||||||
|
icu = [ pyicu ];
|
||||||
|
osv = [ openapi-spec-validator ];
|
||||||
|
ssv = [ swagger-spec-validator ];
|
||||||
|
};
|
||||||
|
|
||||||
nativeCheckInputs = [
|
nativeCheckInputs = [
|
||||||
pytestCheckHook
|
pytestCheckHook
|
||||||
openapi-spec-validator
|
] ++ lib.flatten (lib.attrValues passthru.optional-dependencies);
|
||||||
];
|
|
||||||
|
|
||||||
# Disable tests that require network
|
# Disable tests that require network
|
||||||
disabledTestPaths = [
|
disabledTestPaths = [
|
||||||
"tests/test_convert.py"
|
"tests/test_convert.py"
|
||||||
];
|
];
|
||||||
disabledTests = [
|
disabledTests = [
|
||||||
|
"test_convert_defaults"
|
||||||
|
"test_convert_output"
|
||||||
"test_fetch_url_http"
|
"test_fetch_url_http"
|
||||||
];
|
];
|
||||||
pythonImportsCheck = [ "prance" ];
|
pythonImportsCheck = [ "prance" ];
|
||||||
|
|
||||||
meta = with lib; {
|
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";
|
description = "Resolving Swagger/OpenAPI 2.0 and 3.0.0 Parser";
|
||||||
homepage = "https://github.com/RonnyPfannschmidt/prance";
|
homepage = "https://github.com/RonnyPfannschmidt/prance";
|
||||||
license = licenses.mit;
|
license = licenses.mit;
|
||||||
|
Loading…
Reference in New Issue
Block a user