forked from pool/python-pydantic-core
- Sprinkle in multibuild to avoid build cycles.
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pydantic-core?expand=0&rev=4
This commit is contained in:
3
_multibuild
Normal file
3
_multibuild
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
<multibuild>
|
||||||
|
<package>test</package>
|
||||||
|
</multibuild>
|
@@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Mar 12 00:24:28 UTC 2024 - Steve Kowalik <steven.kowalik@suse.com>
|
||||||
|
|
||||||
|
- Sprinkle in multibuild to avoid build cycles.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sat Mar 9 13:15:13 UTC 2024 - ecsos <ecsos@opensuse.org>
|
Sat Mar 9 13:15:13 UTC 2024 - ecsos <ecsos@opensuse.org>
|
||||||
|
|
||||||
|
@@ -16,8 +16,16 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
|
%global flavor @BUILD_FLAVOR@%{nil}
|
||||||
|
%if "%{flavor}" == "test"
|
||||||
|
%define psuffix -test
|
||||||
|
%bcond_without test
|
||||||
|
%else
|
||||||
|
%define psuffix %{nil}
|
||||||
|
%bcond_with test
|
||||||
|
%endif
|
||||||
%{?sle15_python_module_pythons}
|
%{?sle15_python_module_pythons}
|
||||||
Name: python-pydantic-core
|
Name: python-pydantic-core%{psuffix}
|
||||||
Version: 2.16.3
|
Version: 2.16.3
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Core functionality for pydantic validation and serialization
|
Summary: Core functionality for pydantic validation and serialization
|
||||||
@@ -31,12 +39,15 @@ BuildRequires: %{python_module typing-extensions >= 4.6.0}
|
|||||||
BuildRequires: cargo-packaging
|
BuildRequires: cargo-packaging
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
# SECTION test requirements
|
# SECTION test requirements
|
||||||
BuildRequires: %{python_module pytest}
|
%if %{with test}
|
||||||
BuildRequires: %{python_module dirty-equals}
|
BuildRequires: %{python_module dirty-equals}
|
||||||
BuildRequires: %{python_module hypothesis}
|
BuildRequires: %{python_module hypothesis}
|
||||||
|
BuildRequires: %{python_module pydantic-core == %{version}}
|
||||||
BuildRequires: %{python_module pytest-benchmark}
|
BuildRequires: %{python_module pytest-benchmark}
|
||||||
BuildRequires: %{python_module pytest-mock}
|
BuildRequires: %{python_module pytest-mock}
|
||||||
BuildRequires: %{python_module pytest-timeout}
|
BuildRequires: %{python_module pytest-timeout}
|
||||||
|
BuildRequires: %{python_module pytest}
|
||||||
|
%endif
|
||||||
# /SECTION
|
# /SECTION
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
Requires: python-typing-extensions >= 4.6.0
|
Requires: python-typing-extensions >= 4.6.0
|
||||||
@@ -51,17 +62,26 @@ Pydantic-core is currently around 17x faster than pydantic V1.
|
|||||||
%autosetup -p1 -n pydantic_core-%{version} -a1
|
%autosetup -p1 -n pydantic_core-%{version} -a1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
# The build takes quite a long time, so we don't want to build this while under test.
|
||||||
|
%if %{without test}
|
||||||
%pyproject_wheel
|
%pyproject_wheel
|
||||||
|
%endif
|
||||||
|
|
||||||
%install
|
%install
|
||||||
|
%if %{without test}
|
||||||
%pyproject_install
|
%pyproject_install
|
||||||
%python_expand %fdupes %{buildroot}%{$python_sitearch}
|
%python_expand %fdupes %{buildroot}%{$python_sitearch}
|
||||||
|
%endif
|
||||||
|
|
||||||
%check
|
%check
|
||||||
|
%if %{with test}
|
||||||
%pytest_arch
|
%pytest_arch
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{without test}
|
||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
%{python_sitearch}/pydantic_core
|
%{python_sitearch}/pydantic_core
|
||||||
%{python_sitearch}/pydantic_core-%{version}.dist-info
|
%{python_sitearch}/pydantic_core-%{version}.dist-info
|
||||||
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Reference in New Issue
Block a user