- Add multibuild for tests to avoid package build cycle.
flasgger -> flex (testing) -> httpbin -> flasgger OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-flasgger?expand=0&rev=11
This commit is contained in:
parent
bd80881954
commit
4570c3694c
3
_multibuild
Normal file
3
_multibuild
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
<multibuild>
|
||||||
|
<package>test</package>
|
||||||
|
</multibuild>
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Dec 22 08:47:43 UTC 2022 - Daniel Garcia <daniel.garcia@suse.com>
|
||||||
|
|
||||||
|
- Add multibuild for tests to avoid package build cycle.
|
||||||
|
flasgger -> flex (testing) -> httpbin -> flasgger
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sun Oct 23 10:03:15 UTC 2022 - John Vandenberg <jayvdb@gmail.com>
|
Sun Oct 23 10:03:15 UTC 2022 - John Vandenberg <jayvdb@gmail.com>
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-flasgger
|
# spec file
|
||||||
#
|
#
|
||||||
# Copyright (c) 2022 SUSE LLC
|
# Copyright (c) 2022 SUSE LLC
|
||||||
#
|
#
|
||||||
@ -16,7 +16,16 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
Name: python-flasgger
|
%global flavor @BUILD_FLAVOR@%{nil}
|
||||||
|
%if "%{flavor}" == "test"
|
||||||
|
%define psuffix -test
|
||||||
|
%bcond_without test
|
||||||
|
%else
|
||||||
|
%define psuffix %{nil}
|
||||||
|
%bcond_with test
|
||||||
|
%endif
|
||||||
|
|
||||||
|
Name: python-flasgger%{psuffix}
|
||||||
Version: 0.9.5
|
Version: 0.9.5
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Tool to extract swagger specs from Flask projects
|
Summary: Tool to extract swagger specs from Flask projects
|
||||||
@ -33,7 +42,10 @@ Requires: python-jsonschema >= 3.0.1
|
|||||||
Requires: python-mistune
|
Requires: python-mistune
|
||||||
Requires: python-six >= 1.10
|
Requires: python-six >= 1.10
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
|
%if %{with test}
|
||||||
# SECTION test requirements
|
# SECTION test requirements
|
||||||
|
BuildRequires: %{python_module flasgger = %{version}}
|
||||||
BuildRequires: %{python_module Flask >= 0.10}
|
BuildRequires: %{python_module Flask >= 0.10}
|
||||||
BuildRequires: %{python_module PyYAML >= 3.0}
|
BuildRequires: %{python_module PyYAML >= 3.0}
|
||||||
BuildRequires: %{python_module flex}
|
BuildRequires: %{python_module flex}
|
||||||
@ -43,6 +55,8 @@ BuildRequires: %{python_module mistune}
|
|||||||
BuildRequires: %{python_module pytest >= 3.0.7}
|
BuildRequires: %{python_module pytest >= 3.0.7}
|
||||||
BuildRequires: %{python_module six >= 1.10}
|
BuildRequires: %{python_module six >= 1.10}
|
||||||
# /SECTION
|
# /SECTION
|
||||||
|
%endif
|
||||||
|
|
||||||
%python_subpackages
|
%python_subpackages
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -56,6 +70,7 @@ rm tests/test_examples.py
|
|||||||
|
|
||||||
find . -name .DS_Store -print -delete
|
find . -name .DS_Store -print -delete
|
||||||
|
|
||||||
|
%if !%{with test}
|
||||||
%build
|
%build
|
||||||
%python_build
|
%python_build
|
||||||
|
|
||||||
@ -64,13 +79,18 @@ find . -name .DS_Store -print -delete
|
|||||||
%{python_expand chmod -x %{buildroot}%{$python_sitelib}/flasgger/ui2/static/lang/*.js
|
%{python_expand chmod -x %{buildroot}%{$python_sitelib}/flasgger/ui2/static/lang/*.js
|
||||||
%fdupes %{buildroot}%{$python_sitelib}
|
%fdupes %{buildroot}%{$python_sitelib}
|
||||||
}
|
}
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{with test}
|
||||||
%check
|
%check
|
||||||
%pytest tests/
|
%pytest tests/
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if !%{with test}
|
||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%doc README.md
|
%doc README.md
|
||||||
%{python_sitelib}/flasgger*/
|
%{python_sitelib}/flasgger*/
|
||||||
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Loading…
Reference in New Issue
Block a user