2018-08-02 07:10:10 +00:00
|
|
|
#
|
|
|
|
|
# spec file for package python-openapi-core
|
|
|
|
|
#
|
2021-08-17 12:47:07 +00:00
|
|
|
# Copyright (c) 2021 SUSE LLC
|
2018-08-02 07:10:10 +00:00
|
|
|
#
|
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
2019-06-03 11:20:36 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2018-08-02 07:10:10 +00:00
|
|
|
#
|
|
|
|
|
|
2018-08-08 15:14:23 +00:00
|
|
|
|
2018-08-02 07:10:10 +00:00
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
2020-01-10 14:51:19 +00:00
|
|
|
%bcond_without python2
|
2018-08-02 07:10:10 +00:00
|
|
|
Name: python-openapi-core
|
2021-08-17 12:47:07 +00:00
|
|
|
Version: 0.14.2
|
2018-08-02 07:10:10 +00:00
|
|
|
Release: 0
|
|
|
|
|
Summary: Adds client-side and server-side support for the oas3
|
|
|
|
|
License: BSD-3-Clause
|
2018-08-08 15:14:23 +00:00
|
|
|
URL: https://github.com/p1c2u/openapi-core
|
2021-08-17 12:47:07 +00:00
|
|
|
Source: https://github.com/p1c2u/openapi-core/archive/%{version}.tar.gz#/openapi-core-%{version}-gh.tar.gz
|
2018-08-08 15:14:23 +00:00
|
|
|
BuildRequires: %{python_module Flask}
|
2021-08-17 12:47:07 +00:00
|
|
|
BuildRequires: %{python_module WebOb}
|
|
|
|
|
BuildRequires: %{python_module Werkzeug}
|
2019-06-03 11:20:36 +00:00
|
|
|
BuildRequires: %{python_module attrs}
|
2021-08-17 12:47:07 +00:00
|
|
|
BuildRequires: %{python_module dictpath}
|
|
|
|
|
BuildRequires: %{python_module falcon}
|
2019-09-26 14:08:17 +00:00
|
|
|
BuildRequires: %{python_module isodate}
|
2018-08-08 15:14:23 +00:00
|
|
|
BuildRequires: %{python_module lazy-object-proxy}
|
2020-03-31 07:29:00 +00:00
|
|
|
BuildRequires: %{python_module more-itertools >= 5.0.0}
|
|
|
|
|
BuildRequires: %{python_module openapi-schema-validator}
|
2018-08-08 15:14:23 +00:00
|
|
|
BuildRequires: %{python_module openapi-spec-validator}
|
2020-03-31 07:29:00 +00:00
|
|
|
BuildRequires: %{python_module parse >= 1.14.0}
|
2020-05-29 09:25:05 +00:00
|
|
|
BuildRequires: %{python_module pytest}
|
2021-08-17 12:47:07 +00:00
|
|
|
BuildRequires: %{python_module responses}
|
2018-08-02 07:10:10 +00:00
|
|
|
BuildRequires: %{python_module setuptools}
|
2018-08-08 15:14:23 +00:00
|
|
|
BuildRequires: %{python_module six}
|
|
|
|
|
BuildRequires: fdupes
|
|
|
|
|
BuildRequires: python-rpm-macros
|
2021-08-17 12:47:07 +00:00
|
|
|
Requires: python-Werkzeug
|
2019-06-03 11:20:36 +00:00
|
|
|
Requires: python-attrs
|
2021-08-17 12:47:07 +00:00
|
|
|
Requires: python-dictpath
|
2019-09-26 14:08:17 +00:00
|
|
|
Requires: python-isodate
|
2018-08-02 07:10:10 +00:00
|
|
|
Requires: python-lazy-object-proxy
|
2020-03-31 07:29:00 +00:00
|
|
|
Requires: python-more-itertools >= 5.0.0
|
|
|
|
|
Requires: python-openapi-schema-validator
|
2018-08-08 15:14:23 +00:00
|
|
|
Requires: python-openapi-spec-validator
|
2020-03-31 07:29:00 +00:00
|
|
|
Requires: python-parse >= 1.14.0
|
2018-08-02 07:10:10 +00:00
|
|
|
Requires: python-six
|
|
|
|
|
BuildArch: noarch
|
2020-01-10 14:51:19 +00:00
|
|
|
%if %{with python2}
|
|
|
|
|
BuildRequires: python-backports.functools_lru_cache
|
|
|
|
|
BuildRequires: python-backports.functools_partialmethod
|
|
|
|
|
BuildRequires: python-enum34
|
2021-08-17 12:47:07 +00:00
|
|
|
BuildRequires: python2-mock
|
2020-01-10 14:51:19 +00:00
|
|
|
%endif
|
|
|
|
|
%ifpython2
|
|
|
|
|
Requires: python-backports.functools_lru_cache
|
|
|
|
|
Requires: python-backports.functools_partialmethod
|
|
|
|
|
Requires: python-enum34
|
|
|
|
|
%endif
|
2018-08-02 07:10:10 +00:00
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
Openapi-core is a Python library that adds client-side
|
|
|
|
|
and server-side support for the OpenAPI Specification
|
|
|
|
|
v3.0.0.
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%setup -q -n openapi-core-%{version}
|
2021-08-17 12:47:07 +00:00
|
|
|
# remove extra mock for Python 3
|
|
|
|
|
find tests -name "*.py" -exec sed -i '/^import mock/ c try:\
|
|
|
|
|
from unittest import mock\
|
|
|
|
|
except ImportError:\
|
|
|
|
|
import mock\
|
|
|
|
|
' {} ';'
|
2018-08-02 07:10:10 +00:00
|
|
|
|
|
|
|
|
%build
|
2018-08-08 15:14:23 +00:00
|
|
|
export LANG=en_US.UTF-8
|
2018-08-02 07:10:10 +00:00
|
|
|
%python_build
|
|
|
|
|
|
|
|
|
|
%install
|
2018-08-08 15:14:23 +00:00
|
|
|
export LANG=en_US.UTF-8
|
2018-08-02 07:10:10 +00:00
|
|
|
%python_install
|
2018-08-08 15:14:23 +00:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
|
|
|
|
|
|
%check
|
2020-03-31 07:29:00 +00:00
|
|
|
sed -i '/addopts/d' setup.cfg
|
2018-08-08 15:14:23 +00:00
|
|
|
export LANG=en_US.UTF-8
|
2021-08-17 12:47:07 +00:00
|
|
|
# test_string_format_invalid_value: pytest >=5 incompatible,
|
|
|
|
|
# fixed in git by major rewrite (but still not released in 0.14.2)
|
|
|
|
|
# https://github.com/p1c2u/openapi-core/issues/158
|
2020-05-29 09:25:05 +00:00
|
|
|
%pytest tests/unit -k 'not test_string_format_invalid_value'
|
2018-08-02 07:10:10 +00:00
|
|
|
|
|
|
|
|
%files %{python_files}
|
|
|
|
|
%license LICENSE
|
2018-08-08 15:14:23 +00:00
|
|
|
%doc README.rst
|
2021-08-17 12:47:07 +00:00
|
|
|
%{python_sitelib}/openapi_core
|
|
|
|
|
%{python_sitelib}/openapi_core-%{version}*-info
|
2018-08-02 07:10:10 +00:00
|
|
|
|
|
|
|
|
%changelog
|