2019-03-14 14:09:21 +01:00
|
|
|
#
|
2022-12-22 09:54:14 +01:00
|
|
|
# spec file
|
2019-03-14 14:09:21 +01:00
|
|
|
#
|
2024-01-03 11:05:11 +01:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
2019-03-14 14:09:21 +01: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.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
2022-12-22 09:54:14 +01:00
|
|
|
%global flavor @BUILD_FLAVOR@%{nil}
|
|
|
|
%if "%{flavor}" == "test"
|
|
|
|
%define psuffix -test
|
|
|
|
%bcond_without test
|
|
|
|
%else
|
|
|
|
%define psuffix %{nil}
|
|
|
|
%bcond_with test
|
|
|
|
%endif
|
|
|
|
|
2023-04-21 16:39:19 +02:00
|
|
|
%{?sle15_python_module_pythons}
|
2022-12-22 09:54:14 +01:00
|
|
|
Name: python-flasgger%{psuffix}
|
2023-08-08 07:36:42 +02:00
|
|
|
Version: 0.9.7.1
|
2019-03-14 14:09:21 +01:00
|
|
|
Release: 0
|
2019-03-14 19:44:45 +01:00
|
|
|
Summary: Tool to extract swagger specs from Flask projects
|
2019-03-14 14:09:21 +01:00
|
|
|
License: MIT
|
2023-11-27 19:45:38 +01:00
|
|
|
URL: https://github.com/flasgger/flasgger/
|
2019-03-14 14:09:21 +01:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/f/flasgger/flasgger-%{version}.tar.gz
|
2023-08-08 07:36:42 +02:00
|
|
|
BuildRequires: %{python_module pip}
|
2024-01-03 11:05:11 +01:00
|
|
|
BuildRequires: %{python_module setuptools}
|
2023-08-08 07:36:42 +02:00
|
|
|
BuildRequires: %{python_module wheel}
|
2019-03-14 14:09:21 +01:00
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: python-rpm-macros
|
|
|
|
Requires: python-Flask >= 0.10
|
|
|
|
Requires: python-PyYAML >= 3.0
|
2022-04-28 09:31:54 +02:00
|
|
|
Requires: python-jsonschema >= 3.0.1
|
2023-11-27 19:45:38 +01:00
|
|
|
Requires: python-mistune >= 3
|
2023-08-08 07:36:42 +02:00
|
|
|
Requires: python-packaging
|
2019-03-14 14:09:21 +01:00
|
|
|
Requires: python-six >= 1.10
|
|
|
|
BuildArch: noarch
|
2022-12-22 09:54:14 +01:00
|
|
|
|
|
|
|
%if %{with test}
|
2022-10-25 07:17:54 +02:00
|
|
|
# SECTION test requirements
|
2022-12-22 09:54:14 +01:00
|
|
|
BuildRequires: %{python_module flasgger = %{version}}
|
2022-10-25 07:17:54 +02:00
|
|
|
BuildRequires: %{python_module Flask >= 0.10}
|
|
|
|
BuildRequires: %{python_module PyYAML >= 3.0}
|
|
|
|
BuildRequires: %{python_module flex}
|
|
|
|
BuildRequires: %{python_module jsonschema >= 3.0.1}
|
|
|
|
BuildRequires: %{python_module marshmallow}
|
2023-11-27 19:45:38 +01:00
|
|
|
BuildRequires: %{python_module mistune >= 3}
|
2022-10-25 07:17:54 +02:00
|
|
|
BuildRequires: %{python_module pytest >= 3.0.7}
|
|
|
|
BuildRequires: %{python_module six >= 1.10}
|
|
|
|
# /SECTION
|
2022-12-22 09:54:14 +01:00
|
|
|
%endif
|
|
|
|
|
2019-03-14 14:09:21 +01:00
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
%description
|
2019-03-14 19:44:45 +01:00
|
|
|
Flasgger is a Flask extension to extract OpenAPI=Specification from all Flask views registered in an API.
|
2019-03-14 14:09:21 +01:00
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n flasgger-%{version}
|
2022-10-25 07:24:51 +02:00
|
|
|
|
2022-10-25 07:17:54 +02:00
|
|
|
# Examples directory is not included in PyPI release
|
|
|
|
rm tests/test_examples.py
|
2019-03-14 14:09:21 +01:00
|
|
|
|
2022-10-25 07:24:51 +02:00
|
|
|
find . -name .DS_Store -print -delete
|
|
|
|
|
2022-12-22 09:54:14 +01:00
|
|
|
%if !%{with test}
|
2019-03-14 14:09:21 +01:00
|
|
|
%build
|
2023-08-08 07:36:42 +02:00
|
|
|
%pyproject_wheel
|
2019-03-14 14:09:21 +01:00
|
|
|
|
|
|
|
%install
|
2023-08-08 07:36:42 +02:00
|
|
|
%pyproject_install
|
2022-10-25 07:24:51 +02:00
|
|
|
%{python_expand chmod -x %{buildroot}%{$python_sitelib}/flasgger/ui2/static/lang/*.js
|
|
|
|
%fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
}
|
2022-12-22 09:54:14 +01:00
|
|
|
%endif
|
2019-03-14 14:09:21 +01:00
|
|
|
|
2022-12-22 09:54:14 +01:00
|
|
|
%if %{with test}
|
2022-10-25 07:17:54 +02:00
|
|
|
%check
|
|
|
|
%pytest tests/
|
2022-12-22 09:54:14 +01:00
|
|
|
%endif
|
2019-03-14 14:09:21 +01:00
|
|
|
|
2022-12-22 09:54:14 +01:00
|
|
|
%if !%{with test}
|
2019-03-14 14:09:21 +01:00
|
|
|
%files %{python_files}
|
|
|
|
%license LICENSE
|
|
|
|
%doc README.md
|
2023-08-08 07:36:42 +02:00
|
|
|
%{python_sitelib}/flasgger
|
|
|
|
%{python_sitelib}/flasgger-%{version}.dist-info
|
2022-12-22 09:54:14 +01:00
|
|
|
%endif
|
2019-03-14 14:09:21 +01:00
|
|
|
|
|
|
|
%changelog
|